Skip to content

Commit

Permalink
Merge pull request #168 from Juneo-io/dev
Browse files Browse the repository at this point in the history
v0.0.133
  • Loading branch information
alekswaslet authored Aug 22, 2024
2 parents 448244b + 71e2c57 commit 53c1898
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "juneojs",
"version": "0.0.132",
"version": "0.0.133",
"description": "Juneo JS Library",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
13 changes: 6 additions & 7 deletions src/wallet/account/evm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,12 @@ export class EVMAccount extends AbstractChainAccount {
}

async estimate (operation: ChainNetworkOperation): Promise<ChainOperationSummary> {
const provider: MCNProvider = await this.provider.getStaticProvider()
const provider = await this.provider.getStaticProvider()
if (operation.type === NetworkOperationType.Send) {
const send: SendOperation = operation as SendOperation
const isContract: boolean = isContractAddress(send.assetId)
const address: string = isContract ? send.assetId : send.address
const data: string = isContract
? await this.chain.getContractTransactionData(provider, send.assetId, address, send.amount)
const send = operation as SendOperation
const isContract = isContractAddress(send.assetId)
const data = isContract
? await this.chain.getContractTransactionData(provider, send.assetId, send.address, send.amount)
: EmptyCallData
return await estimateEVMOperation(
provider,
Expand All @@ -51,7 +50,7 @@ export class EVMAccount extends AbstractChainAccount {
send,
[new BaseSpending(this.chain, send.amount, send.assetId)],
new Map<string, bigint>([[send.assetId, send.amount]]),
address,
isContract ? send.assetId : send.address,
isContract ? BigInt(0) : send.amount,
data,
TransactionType.Base
Expand Down

0 comments on commit 53c1898

Please sign in to comment.