Skip to content

Commit

Permalink
chore: have bankSend accept from argument set to default as validat…
Browse files Browse the repository at this point in the history
…or address

Refs: Agoric#187
  • Loading branch information
anilhelvaci committed Oct 31, 2024
1 parent d55bfe0 commit 6ce0966
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/synthetic-chain/src/lib/agd-lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,15 @@ export const makeAgd = ({
return make();
};

export const bankSend = (addr: string, wanted: string) => {
export const bankSend = (
addr: string,
wanted: string,
from: string = VALIDATORADDR,
) => {
const chain = ['--chain-id', CHAINID];
const from = ['--from', VALIDATORADDR];
const fromArg = ['--from', from];
const testKeyring = ['--keyring-backend', 'test'];
const noise = [...from, ...chain, ...testKeyring, '--yes'];
const noise = [...fromArg, ...chain, ...testKeyring, '--yes'];

return agd.tx('bank', 'send', VALIDATORADDR, addr, wanted, ...noise);
return agd.tx('bank', 'send', from, addr, wanted, ...noise);
};

0 comments on commit 6ce0966

Please sign in to comment.