This repository was archived by the owner on Dec 1, 2024. It is now read-only.
File tree 1 file changed +7
-16
lines changed
1 file changed +7
-16
lines changed Original file line number Diff line number Diff line change @@ -27,28 +27,19 @@ const App: Component = () => {
27
27
28
28
onMount ( ( ) => reconnectWallet ( ) )
29
29
30
- const transactionSignerAccount = createMemo < TransactionSignerAccount > ( ( ) => ( {
31
- addr : address ( ) ,
32
- signer : transactionSigner ,
33
- } ) )
30
+ const transactionSignerAccount = algokit . transactionSignerAccount ( transactionSigner , address ( ) )
34
31
35
32
async function sendTxn ( ) {
36
33
setConfirmedTxn ( "" )
37
- const suggestedParams = await algodClient ( ) . getTransactionParams ( ) . do ( )
38
34
39
- const payTxn = makePaymentTxnWithSuggestedParamsFromObject ( {
40
- from : address ( ) ,
41
- to : address ( ) ,
42
- amount : 0 ,
43
- suggestedParams,
44
- } )
45
- const txn = await algokit . getTransactionWithSigner ( payTxn , transactionSignerAccount ( ) )
35
+ const result = await algokit . transferAlgos ( {
36
+ amount : ( 0 ) . algos ( ) ,
37
+ from : transactionSignerAccount ,
38
+ to : transactionSignerAccount
39
+ } , algodClient ( ) )
46
40
47
- const atc = new AtomicTransactionComposer ( )
48
- atc . addTransaction ( txn )
49
- const result = await atc . execute ( algodClient ( ) , 4 )
50
41
console . log ( "Txn confirmed: " , result )
51
- setConfirmedTxn ( result . txIDs [ 0 ] )
42
+ setConfirmedTxn ( result . transaction . txID ( ) )
52
43
}
53
44
54
45
return (
You can’t perform that action at this time.
0 commit comments