Skip to content

Commit

Permalink
Update signingarchwayclient.spec.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
eliasmpw authored Feb 6, 2024
1 parent 0599056 commit c238c82
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions packages/arch3-core/src/signingarchwayclient.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,40 +441,6 @@ describe('SigningArchwayClient', () => {

client.disconnect();
});

it('doesn\'t generate RewardRecord entries when withdrawToWallet is enabled', async () => {
const [wallet, accounts] = await getWalletWithAccounts();
const client = await SigningArchwayClient.connectWithSigner(archwayd.endpoint, wallet, clientOptions);

const contractAddress = contracts.voter.addresses[2];
const rewardsAddress = accounts[5].address;

/* eslint-disable camelcase, @typescript-eslint/naming-convention */
const msg = {
new_voting: {
name: 'test_voting_rewards',
vote_options: ['yes', 'no'],
duration: 10000000000,
}
};
/* eslint-enable camelcase, @typescript-eslint/naming-convention */
await client.execute(rewardsAddress, contractAddress, msg, 'auto', undefined, coins(10, archwayd.denom));

const result = await client.withdrawContractRewards(rewardsAddress, 0, 'auto');

expect(result).toMatchObject({
height: expect.any(Number),
transactionHash: expect.any(String),
gasWanted: expect.any(Number),
gasUsed: expect.any(Number),
rewardsAddress: rewardsAddress,
rewards: expect.arrayContaining([]),
});
expect(result.logs).not.toHaveLength(0);
expect(result.events).not.toHaveLength(0);

client.disconnect();
});
});
});
});

0 comments on commit c238c82

Please sign in to comment.