wallet-kit icon indicating copy to clipboard operation
wallet-kit copied to clipboard

Property '#private' in type 'TransactionBlock' refers to a different member that cannot be accessed from within type 'TransactionBlock'.

Open MyHackInfo opened this issue 2 years ago • 1 comments

`

async function handleSignAndExecuteTxBlock() {

if (!wallet.connected) return;

// define a programmable transaction
const tx = new TransactionBlock();

const packageObjectId = "0xXXX";

tx.moveCall({
  target: `${packageObjectId}::nft::mint`,
  arguments: [tx.pure("Example NFT")],
});

try {
  // execute the programmable transaction
  const resData = await wallet.signAndExecuteTransactionBlock({
    transactionBlock: tx,
  });
  console.log("nft minted successfully!", resData);
  alert("Congrats! your nft is minted!");
} catch (e) {
  console.error("nft mint failed", e);
}

} ` error

MyHackInfo avatar Oct 04 '23 09:10 MyHackInfo

This issue should be the version mismatch between @suiet/wallet-kit and @mysten/sui.js. So you could try to check these two versions and match them.

bruceeewong avatar Jan 27 '24 14:01 bruceeewong