Commit db55356
authored
feat: adds simple result type (tari-project#81)
Description
---
Simple transaction result wrapper
Bump version 0.12.0
Motivation and Context
---
```typescript
const transaction = TransactionBuilder
.new(network)
.feeTransactionPayFromComponent(account.address, fee)
.callMethod(
{
componentAddress: account.address,
methodName: "withdraw",
},
[xtrAddress, 10],
)
.saveVar("bucket")
.callMethod(
{
componentAddress: account.address,
methodName: "deposit",
},
[{ Workspace: "bucket" }],
)
.addInput({ substate_id: account.address, version: null })
.buildUnsignedTransaction();
const submitTransactionRequest = buildTransactionRequest(
transaction,
account.account_id,
);
const txResult = await submitAndWaitForTransaction(signer, submitTransactionRequest);
expect(txResult.status).toBe(TransactionStatus.Accepted);
const accounts = txResult.getComponentsByTemplateAddress(ACCOUNT_TEMPLATE_ADDRESS);
```
How Has This Been Tested?
---
Breaking Changes
---
- [ ] None
- [x] Please specify
<!-- Does this include a breaking change? If so, include this line as a
footer -->
BREAKING CHANGE: waitForTransaction now returns a
SimpleTransactionResult1 parent d69e2a7 commit db55356
38 files changed
Lines changed: 3405 additions & 5530 deletions
File tree
- docusaurus/tari-docs
- examples/vite-typescript-react/src
- packages
- builders
- src
- helpers
- transaction
- indexer_provider
- metamask_signer
- src
- permissions
- react-mui-connect-button
- tari_provider
- src
- tari_signer
- tari_universe
- tarijs_types
- src
- helpers
- tarijs
- src
- test/integration-tests
- wallet_daemon
- wallet_daemon
- src
- walletconnect
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
0 commit comments