Skip to content

Commit

Permalink
test(smart-wallet): deposit unknown brand more than once fails
Browse files Browse the repository at this point in the history
  • Loading branch information
dckc committed Feb 9, 2023
1 parent 3551b01 commit 8b6dd84
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/inter-protocol/test/smartWallet/test-psm-integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,20 @@ test('deposit unknown brand', async t => {
t.deepEqual(result, { brand: rial.brand, value: 0n });
});

test.failing('deposit unknown brand more than once', async t => {
const rial = withAmountUtils(makeIssuerKit('rial'));

const wallet = await t.context.simpleProvideWallet('agoric1queue');

for await (const _ of [1, 2]) {
const payment = rial.mint.mintPayment(rial.make(1_000n));
// @ts-expect-error deposit does take a FarRef<Payment>
const result = await wallet.getDepositFacet().receive(harden(payment));
// successful request but not deposited
t.deepEqual(result, { brand: rial.brand, value: 0n });
}
});

test.todo('bad offer schema');
test.todo('not enough funds');
test.todo(
Expand Down

0 comments on commit 8b6dd84

Please sign in to comment.