Skip to content

Commit 8cf6856

Browse files
fix(sdk-coin-iota): use full Coin struct type in iotax_getOwnedObjects filter
WIN-8627 TICKET: WIN-8627
1 parent eb6608b commit 8cf6856

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

modules/sdk-coin-iota/src/iota.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,15 +558,16 @@ export class Iota extends BaseCoin {
558558
): Promise<IotaObjectWithBalance[]> {
559559
const url = rpcUrl || this.getPublicNodeUrl();
560560
const allObjects: IotaObjectWithBalance[] = [];
561-
const normalizedCoinType = coinType || this.getNativeCoinType();
561+
const innerCoinType = coinType || this.getNativeCoinType();
562+
const structType = `0x2::coin::Coin<${innerCoinType}>`;
562563
let cursor: string | null = null;
563564
let hasNextPage = true;
564565
const MAX_PAGES = 500;
565566
let pageCount = 0;
566567
while (hasNextPage && pageCount < MAX_PAGES) {
567568
pageCount++;
568569
const query = {
569-
filter: { StructType: normalizedCoinType },
570+
filter: { StructType: structType },
570571
options: { showContent: true, showType: true },
571572
};
572573

0 commit comments

Comments
 (0)