Skip to content

Commit 6ce0966

Browse files
committed
chore: have bankSend accept from argument set to default as validator address
Refs: Agoric#187
1 parent d55bfe0 commit 6ce0966

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

packages/synthetic-chain/src/lib/agd-lib.ts

+8-4
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,15 @@ export const makeAgd = ({
133133
return make();
134134
};
135135

136-
export const bankSend = (addr: string, wanted: string) => {
136+
export const bankSend = (
137+
addr: string,
138+
wanted: string,
139+
from: string = VALIDATORADDR,
140+
) => {
137141
const chain = ['--chain-id', CHAINID];
138-
const from = ['--from', VALIDATORADDR];
142+
const fromArg = ['--from', from];
139143
const testKeyring = ['--keyring-backend', 'test'];
140-
const noise = [...from, ...chain, ...testKeyring, '--yes'];
144+
const noise = [...fromArg, ...chain, ...testKeyring, '--yes'];
141145

142-
return agd.tx('bank', 'send', VALIDATORADDR, addr, wanted, ...noise);
146+
return agd.tx('bank', 'send', from, addr, wanted, ...noise);
143147
};

0 commit comments

Comments
 (0)