Skip to content

Commit

Permalink
Increase provider tests gas price for sending a transaction.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Apr 18, 2021
1 parent 4a44865 commit 8eaeba3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/tests/src.ts/test-providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -799,19 +799,22 @@ testFunctions.push({
networks: [ "ropsten" ], // Only test on Ropsten
checkSkip: (provider: string, network: string, test: TestDescription) => {
return false;
//return (provider === "PocketProvider");
},
execute: async (provider: ethers.providers.Provider) => {
const gasPrice = (await provider.getGasPrice()).mul(10);

const wallet = fundWallet.connect(provider);

const addr = "0x8210357f377E901f18E45294e86a2A32215Cc3C9";


const b0 = await provider.getBalance(wallet.address);
assert.ok(b0.gt(ethers.constants.Zero), "balance is non-zero");

const tx = await wallet.sendTransaction({
to: addr,
value: 123
value: 123,
gasPrice: gasPrice
});

await tx.wait();
Expand All @@ -830,6 +833,8 @@ testFunctions.push({
return false;
},
execute: async (provider: ethers.providers.Provider) => {
const gasPrice = (await provider.getGasPrice()).mul(10);

const wallet = fundWallet.connect(provider);

const addr = "0x8210357f377E901f18E45294e86a2A32215Cc3C9";
Expand All @@ -846,7 +851,8 @@ testFunctions.push({
]
},
to: addr,
value: 123
value: 123,
gasPrice: gasPrice
});

await tx.wait();
Expand Down

0 comments on commit 8eaeba3

Please sign in to comment.