Skip to content
This repository was archived by the owner on Dec 1, 2024. It is now read-only.
Open
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
16 changes: 7 additions & 9 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ const App: Component = () => {

onMount(() => reconnectWallet())

const transactionSignerAccount = createMemo<TransactionSignerAccount>(() => ({
addr: address(),
signer: transactionSigner,
}))
const transactionSignerAccount = createMemo(() => algokit.transactionSignerAccount(transactionSigner, address()))

async function sendTxn() {
setConfirmedTxn("")
Expand All @@ -42,13 +39,14 @@ const App: Component = () => {
amount: 0,
suggestedParams,
})
const txn = await algokit.getTransactionWithSigner(payTxn, transactionSignerAccount())

const atc = new AtomicTransactionComposer()
atc.addTransaction(txn)
const result = await atc.execute(algodClient(), 4)
const result = await algokit.sendTransaction({
from: transactionSignerAccount(),
transaction: payTxn,
}, algodClient())

console.log("Txn confirmed: ", result)
setConfirmedTxn(result.txIDs[0])
setConfirmedTxn(result.transaction.txID())
}

return (
Expand Down