Skip to content

Commit

Permalink
feat(aeternity): skip confirm modal for transactions created by wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
CedrikNikita committed Sep 25, 2024
1 parent 93066f3 commit 1380bea
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/protocols/aeternity/libs/AeAccountHdWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
unpackTx,
Encoded,
METHODS,
Tag,
} from '@aeternity/aepp-sdk';
import { ContractByteArrayEncoder, TypeResolver } from '@aeternity/aepp-calldata';
import { Ref } from 'vue';
Expand All @@ -36,7 +35,6 @@ interface InternalOptions {
/**
* Tags that don't need permission if they are not called from an aepp
*/
const TAGS_TO_SIGN_WITHOUT_PERMISSION: Tag[] = [Tag.SpendTx, Tag.PayingForTx];

export class AeAccountHdWallet extends MemoryAccount {
override readonly address: Encoded.AccountAddress;
Expand Down Expand Up @@ -87,7 +85,7 @@ export class AeAccountHdWallet extends MemoryAccount {
}

const tx = unpackTx(txBase64) as any as ITx;
if (!TAGS_TO_SIGN_WITHOUT_PERMISSION.includes(tx.tag!) || options?.aeppOrigin) {
if (options?.aeppOrigin) {
const { checkOrAskPermission } = usePermissions();
const permissionGranted = await checkOrAskPermission(
METHODS.sign,
Expand Down

0 comments on commit 1380bea

Please sign in to comment.