From 2dfa5f2e71029a9441238b77422940382f849426 Mon Sep 17 00:00:00 2001 From: xbtmatt <90358481+xbtmatt@users.noreply.github.com> Date: Mon, 30 Oct 2023 14:30:02 -0700 Subject: [PATCH] Remove signAnyTransaction for now --- .../wallet-adapter-core/src/WalletCore.ts | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/packages/wallet-adapter-core/src/WalletCore.ts b/packages/wallet-adapter-core/src/WalletCore.ts index 17fc3a06..2947b5a4 100644 --- a/packages/wallet-adapter-core/src/WalletCore.ts +++ b/packages/wallet-adapter-core/src/WalletCore.ts @@ -374,33 +374,6 @@ export class WalletCore extends EventEmitter { } } - // TODO: Implement later. Wallets don't support this right now. - async signAnyTransaction( - transactionInput: InputGenerateTransactionData, - ): Promise { - const payloadData = transactionInput.data; - const aptosConfig = new AptosConfig({network: convertNetwork(this._network)}); - // TODO: Refactor this any, and remove the need for it by fixing the if ("bytecode" in data) stuff in `generateTransaction` in the v2 SDK - const newPayload = await generateTransactionPayload({ ...payloadData as any, aptosConfig: aptosConfig }); - - if (this._wallet && !("signAnyTransaction" in this._wallet)) { - throw new WalletNotSupportedMethod( - `Sign any transaction is not supported by ${this.wallet?.name}` - ).message; - } - try { - this.doesWalletExist(); - const response = await (this._wallet as any).signAnyTransaction( - newPayload - ); - return response; - } catch (error: any) { - const errMsg = - typeof error == "object" && "message" in error ? error.message : error; - throw new WalletSignTransactionError(errMsg).message; - } - } - /** * This function is for signing and submitting a transaction using the `@aptos-labs/ts-sdk` (aka the v2 SDK) * input types. It's internally converting the input types to the old SDK input types and then calling