Skip to content

Commit

Permalink
ALL-4358 Update Flare web3
Browse files Browse the repository at this point in the history
  • Loading branch information
Hathoriel committed Feb 7, 2024
1 parent 8989a30 commit 34b510d
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 20 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tatumio",
"version": "2.2.45",
"version": "2.2.46",
"license": "MIT",
"repository": "https://github.com/tatumio/tatum-js",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ const blockchain = Blockchain.<%= blockchain %>
export const Tatum<%= firstLetterUpperCaseName %>SDK = (args: SDKArguments) => {
const web3 = <%= name %>Web3({
blockchain,
apiCalls: {
getFee: BlockchainFeesService.getBlockchainFee,
},
})
const api = <%= firstLetterUpperCaseName %>Service
const txService = <%= name %>Tx({ blockchain, web3 })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ import { BlockchainFeesService } from '@tatumio/api-client'
export const <%= name %>Web3 = (args: {
blockchain: EvmBasedBlockchain
client?: Web3
apiCalls: {
getFee: typeof BlockchainFeesService.getBlockchainFee
}
}) => {
const evmBasedWeb3Result = evmBasedWeb3(args)

Expand All @@ -24,8 +21,5 @@ export const <%= name %>Web3 = (args: {

return web3
},
async getGasPriceInWei(): Promise<string> {
return (await args.apiCalls.getFee('<%= currency %>')).medium.toString()
},
}
}
3 changes: 0 additions & 3 deletions packages/blockchain/flare/src/lib/flare.sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ const blockchain = Blockchain.FLR
export const TatumFlareSDK = (args: SDKArguments) => {
const web3 = flareWeb3({
blockchain,
apiCalls: {
getFee: BlockchainFeesService.getBlockchainFee,
},
})
const api = FlareService
const txService = flareTx({ blockchain, web3 })
Expand Down
8 changes: 1 addition & 7 deletions packages/blockchain/flare/src/lib/services/flare.web3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@ import Web3 from 'web3'
import { EvmBasedBlockchain } from '@tatumio/shared-core'
import { BlockchainFeesService } from '@tatumio/api-client'

export const flareWeb3 = (args: {
blockchain: EvmBasedBlockchain
client?: Web3
apiCalls: {
getFee: typeof BlockchainFeesService.getBlockchainFee
}
}) => {
export const flareWeb3 = (args: { blockchain: EvmBasedBlockchain; client?: Web3 }) => {
const evmBasedWeb3Result = evmBasedWeb3(args)

return {
Expand Down

0 comments on commit 34b510d

Please sign in to comment.