Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Commit

Permalink
Merge pull request #80 from getwax/wax-36-followup
Browse files Browse the repository at this point in the history
Wax 36 followup
  • Loading branch information
JohnGuilding authored Sep 13, 2023
2 parents 6a71229 + 7178207 commit d015cd9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions demos/inpage/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ dist-ssr
*.njsproj
*.sln
*.sw?

.vite
7 changes: 6 additions & 1 deletion demos/inpage/src/EthereumApi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,12 @@ export default class EthereumApi {
parsedTx.data.to,
);

if (recipientBalance === 0n) {
const txCount =
await this.#waxInPage.ethersProvider.getTransactionCount(
parsedTx.data.to,
);

if (recipientBalance === 0n && txCount === 0) {
gas += extraGasForTransferToNewAddress;
}
}
Expand Down

0 comments on commit d015cd9

Please sign in to comment.