Skip to content

Commit

Permalink
Fix simple transfer example (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
heliuchuan authored Oct 18, 2023
1 parent ca2dcbb commit a82e996
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/typescript/simple_transfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ const example = async () => {
sender: alice.accountAddress.toString(),
data: {
function: "0x1::coin::transfer",
type_arguments: [new TypeTagStruct(StructTag.fromString(APTOS_COIN))],
typeArguments: [new TypeTagStruct(StructTag.fromString(APTOS_COIN))],
arguments: [AccountAddress.fromHexInput(bob.accountAddress.toString()), new U64(TRANSFER_AMOUNT)],
},
});

console.log("\n=== Transfer transaction ===\n");
let committedTxn = await aptos.signAndSubmitTransaction({ signer: alice, transaction: txn });

await aptos.waitForTransaction({ txnHash: committedTxn.hash });
await aptos.waitForTransaction({ transactionHash: committedTxn.hash });
console.log(`Committed transaction: ${committedTxn.hash}`);

console.log("\n=== Balances after transfer ===\n");
Expand Down

0 comments on commit a82e996

Please sign in to comment.