Skip to content

Commit

Permalink
feat: web3 client
Browse files Browse the repository at this point in the history
  • Loading branch information
bangjelkoski committed Jun 7, 2022
1 parent 4c4eba4 commit 8f286b2
Show file tree
Hide file tree
Showing 15 changed files with 266 additions and 218 deletions.
10 changes: 0 additions & 10 deletions packages/sdk-ts/src/core/exports.ts

This file was deleted.

Empty file.
205 changes: 0 additions & 205 deletions packages/sdk-ui-ts/src/services/erc20.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/sdk-ui-ts/src/services/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export * from './gas'
export * from './erc20'
2 changes: 2 additions & 0 deletions packages/wallet-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
"@ethereumjs/common": "^2.6.3",
"@ethereumjs/tx": "^3.5.1",
"@injectivelabs/chain-api": "^1.8.0-rc1",
"@injectivelabs/contracts": "^0.5.27",
"@injectivelabs/exceptions": "^0.5.4",
"@injectivelabs/networks": "^0.5.9",
"@injectivelabs/ts-types": "^0.5.3",
"@injectivelabs/utils": "^0.5.6",
"@keplr-wallet/cosmos": "^0.10.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/wallet-ts/src/Cosmos/CosmosQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
BankBalancesRestResponse,
BlockLatestRestResponse,
NodeInfoRestResponse,
} from '../types/lcd'
} from './types'

export class CosmosQuery {
private rest: string
Expand Down
1 change: 1 addition & 0 deletions packages/wallet-ts/src/Cosmos/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './CosmosQuery'
export * from './CosmosWallet'
export * from './utils'
export * from './types'
File renamed without changes.
13 changes: 12 additions & 1 deletion packages/wallet-ts/src/wallet-strategy/WalletStrategy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Web3 from 'web3'
import { AccountAddress, ChainId } from '@injectivelabs/ts-types'
import {
AccountAddress,
ChainId,
EthereumChainId,
} from '@injectivelabs/ts-types'
import { createAlchemyWeb3 } from '@alch/alchemy-web3'
import Metamask from './strategies/Metamask'
import {
Expand Down Expand Up @@ -105,6 +109,13 @@ export default class WalletStrategy {
return this.getStrategy().sendTransaction(tx, options)
}

public async sendEthereumTransaction(
tx: any,
options: { address: AccountAddress; ethereumChainId: EthereumChainId },
): Promise<string> {
return this.getStrategy().sendEthereumTransaction(tx, options)
}

public async signTransaction(
data: any,
address: AccountAddress,
Expand Down
Loading

0 comments on commit 8f286b2

Please sign in to comment.