diff --git a/examples/simple-dapp/src/main.ts b/examples/simple-dapp/src/main.ts index 5ff63f10..5707b9f9 100644 --- a/examples/simple-dapp/src/main.ts +++ b/examples/simple-dapp/src/main.ts @@ -25,6 +25,7 @@ const content = document.getElementById('app')! content.innerHTML = ` +
@@ -39,6 +40,7 @@ content.innerHTML = ` ` const resetButton = document.getElementById('reset')! +const sendTxButton = document.getElementById('sendTx')! const sessions = document.getElementById('sessions')! const requests = document.getElementById('requests')! const logs = document.getElementById('logs')! @@ -94,6 +96,21 @@ resetButton.onclick = () => { window.location.replace(window.location.origin) } +sendTxButton.onclick = () => { + dAppToolkit.walletApi.sendTransaction({ + transactionManifest: `CALL_METHOD + Address("component_tdx_2_1cptxxxxxxxxxfaucetxxxxxxxxx000527798379xxxxxxxxxyulkzl") + "free" +; +CALL_METHOD + Address("account_tdx_2_12yfw30hdc445j4lnepw7dmrkjcqcswsrxlff5r07mrjq9f8mnnn2r5") + "try_deposit_batch_or_abort" + Expression("ENTIRE_WORKTOP") + Enum<0u8>() +;`, + }) +} + oneTimeRequest.onclick = () => { dAppToolkit.walletApi.sendOneTimeRequest( OneTimeDataRequestBuilder.accounts().exactly(1), diff --git a/packages/dapp-toolkit/src/modules/gateway/gateway.module.ts b/packages/dapp-toolkit/src/modules/gateway/gateway.module.ts index e55597f4..dc084882 100644 --- a/packages/dapp-toolkit/src/modules/gateway/gateway.module.ts +++ b/packages/dapp-toolkit/src/modules/gateway/gateway.module.ts @@ -8,11 +8,7 @@ import { ExponentialBackoff, } from '../../helpers' import { SdkError } from '../../error' -import { - RadixNetworkConfigById, - TransactionStatus, - TransactionStatusResponse, -} from './types' +import { TransactionStatus, TransactionStatusResponse } from './types' import { GatewayApiClientConfig } from '../../_types' export type GatewayModule = ReturnType