Skip to content

Commit

Permalink
test: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ahonn committed May 28, 2024
1 parent 41ec191 commit 969b07e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/services/ckb.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('CKBClient', () => {
vi.clearAllMocks();
});

// XTT
// PDD
const xudtTypeScript: Script = {
codeHash: '0x25c29dc317811a6f6f3985a7a9ebc4838bd388d19d0feeecf0bcd60f6c0975bb',
args: '0x8c556e92974a8dd8237719020a259d606359ac2cc958cb8bda77a1c3bb3cd93b',
Expand All @@ -38,16 +38,16 @@ describe('CKBClient', () => {
};

test('getUniqueCellData: should return the unique cell data', async () => {
// XTT (Unique cell transaction)
const tx = await ckb.rpc.getTransaction('0xe6e23718e45a9c36136367dfb1c47397a7b3db2ff130a1c062f40c795f0b103d');
// PDD (Unique cell transaction)
const tx = await ckb.rpc.getTransaction('0x6a35da16ab1198008545c78b91abe22999f0dc823055553a13d7de29f3063111');
const index = tx.transaction.outputs.findIndex(
(output) => output.type && isUniqueCellTypeScript(output.type, false),
);
const data = ckb.getUniqueCellData(tx as CKBComponents.TransactionWithStatus, index, xudtTypeScript);
expect(data).toEqual({
decimal: 8,
name: 'XUDT Test Token',
symbol: 'XTT',
symbol: 'PDD',
});
});

Expand Down

0 comments on commit 969b07e

Please sign in to comment.