Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #190

Merged
merged 1 commit into from
Sep 1, 2023
Merged

fix #190

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions examples/integration5-token-memo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import { RandomAsset } from '@solana-suite/storage/test/randomAsset';
owner.secret,
totalAmount,
decimals,
tokenMetadata
tokenMetadata,
);

const mint = inst1.unwrap().data as Pubkey;
Expand All @@ -67,18 +67,14 @@ import { RandomAsset } from '@solana-suite/storage/test/randomAsset';
how much progress we have made over the past two years — and
how much work remains
`;
const inst2 = Memo.create(
memoData,
receipt.pubkey, // memo's owner
owner.secret // signer or feePayer
);
const inst2 = Memo.create(memoData, owner.pubkey, owner.secret);

(await [inst1, inst2].submit()).match(
async (value) => {
console.log('# nft sig: ', value.toExplorerUrl());
console.log('# memo sig: ', value.toExplorerUrl());
await Node.confirmedSig(value);
},
(error) => assert.fail(error)
(error) => assert.fail(error),
);

//////////////////////////////////////////////
Expand All @@ -92,15 +88,15 @@ import { RandomAsset } from '@solana-suite/storage/test/randomAsset';
receipt.pubkey,
[owner.secret],
10,
decimals
decimals,
);

(await inst3.submit()).match(
async (value) => {
console.log('# Transfer sig: ', value.toExplorerUrl());
await Node.confirmedSig(value);
},
(error) => assert.fail(error)
(error) => assert.fail(error),
);

//////////////////////////////////////////////
Expand All @@ -115,6 +111,6 @@ import { RandomAsset } from '@solana-suite/storage/test/randomAsset';
console.log(history);
});
},
(err) => assert.fail(err.message)
(err) => assert.fail(err.message),
);
})();