Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow groups of single/atomic transactions #172

Merged
Merged
Show file tree
Hide file tree
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
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
Loading