Skip to content

Commit

Permalink
fixup! feat(fast-usdc): detect transfer completion in cli
Browse files Browse the repository at this point in the history
  • Loading branch information
samsiegart committed Dec 18, 2024
1 parent 3d341a8 commit 24ab2c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions packages/fast-usdc/src/util/bank.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/* global globalThis */

export const queryUSDCBalance = async (
address,
api,
denom,
fetch = globalThis.fetch,
/** @type {string} */ address,
/** @type {string} */ api,
/** @type {string} */ denom,
/** @type {typeof globalThis.fetch} */ fetch,
) => {
const query = `${api}/cosmos/bank/v1beta1/balances/${address}`;
const json = await fetch(query).then(res => res.json());
Expand Down
2 changes: 1 addition & 1 deletion packages/fast-usdc/test/cli/transfer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ test('Transfer registers the noble forwarding account if it does not exist', asy
{ signer: signerMock.signer, address: nobleSignerAddress },
mockEthProvider.provider,
);

console.log(out.getLogOut());
t.is(vstorageMock.getQueryCounts()[settlementAccountVstoragePath], 1);
t.is(fetchMock.getQueryCounts()[nobleFwdAccountQuery], 1);
t.snapshot(signerMock.getSigned());
Expand Down

0 comments on commit 24ab2c3

Please sign in to comment.