Skip to content

Commit

Permalink
fix: allow groups of single/atomic transactions (#172)
Browse files Browse the repository at this point in the history
* build: add new group transaction use cases to the dapp example

* refactor: change background verifier to handle multiple transactions of different groups

* feat: add ui to handle multiple groups of transactions

* fix: standard assets now load correctly
  • Loading branch information
kieranroneill authored Feb 16, 2024
1 parent 3b0ea28 commit 722f9c2
Show file tree
Hide file tree
Showing 61 changed files with 1,844 additions and 1,197 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ import { IAccountInformation } from '../../types';
// utils
import convertToStandardUnit from '@common/utils/convertToStandardUnit';
import {
algorandProviderSignTxns,
signAlgorandProviderTransactions,
createAppCallTransaction,
useWalletSignTxns,
useUseWalletSignTxns,
} from '../../utils';

interface IProps {
Expand Down Expand Up @@ -104,7 +104,9 @@ const ApplicationActionsTab: FC<IProps> = ({

switch (connectionType) {
case ConnectionTypeEnum.AlgorandProvider:
result = await algorandProviderSignTxns([unsignedTransaction]);
result = await signAlgorandProviderTransactions([
unsignedTransaction,
]);

if (!result) {
toast({
Expand All @@ -119,7 +121,7 @@ const ApplicationActionsTab: FC<IProps> = ({

break;
case ConnectionTypeEnum.UseWallet:
result = await useWalletSignTxns(
result = await useUseWalletSignTxns(
signTransactions,
[0],
[encodeUnsignedTransaction(unsignedTransaction)]
Expand Down
10 changes: 6 additions & 4 deletions dapp-example/components/AssetActionsTab/AssetActionsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ import { IAccountInformation, IAssetInformation } from '../../types';
import convertToAtomicUnit from '@common/utils/convertToAtomicUnit';
import convertToStandardUnit from '@common/utils/convertToStandardUnit';
import {
algorandProviderSignTxns,
signAlgorandProviderTransactions,
createAssetConfigTransaction,
createAssetCreateTransaction,
createAssetDestroyTransaction,
createAssetFreezeTransaction,
createAssetTransferTransaction,
useWalletSignTxns,
useUseWalletSignTxns,
} from '../../utils';

interface IProps {
Expand Down Expand Up @@ -229,7 +229,9 @@ const AssetActionsTab: FC<IProps> = ({

switch (connectionType) {
case ConnectionTypeEnum.AlgorandProvider:
result = await algorandProviderSignTxns([unsignedTransaction]);
result = await signAlgorandProviderTransactions([
unsignedTransaction,
]);

if (!result) {
toast({
Expand All @@ -244,7 +246,7 @@ const AssetActionsTab: FC<IProps> = ({

break;
case ConnectionTypeEnum.UseWallet:
result = await useWalletSignTxns(
result = await useUseWalletSignTxns(
signTransactions,
[0],
[encodeUnsignedTransaction(unsignedTransaction)]
Expand Down
Loading

0 comments on commit 722f9c2

Please sign in to comment.