Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CU-86drptyw7 - BSEThereum: Remove mining wait in transfer method #37

Merged
merged 2 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@cityofzion/bs-ethereum",
"comment": "Remove the mining wait in the transfer method to avoid long promises that take time to resolve.",
"type": "patch"
}
],
"packageName": "@cityofzion/bs-ethereum"
}
5 changes: 1 addition & 4 deletions packages/bs-ethereum/src/BSEthereum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,7 @@ export class BSEthereum<BSCustomName extends string = string>
})
}

const transactionMined = await transaction.wait()
if (!transactionMined) throw new Error('Transaction not mined')

return transactionMined.transactionHash
return transaction.hash
}

async calculateTransferFee({ senderAccount, intent }: TransferParam): Promise<string> {
Expand Down
Loading