@aptos-labs/wallet-adapter-react 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @aptos-labs/wallet-adapter-react
2
2
 
3
+ ## 2.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 6266a29: Consolidate options argument on signAndSubmitTransaction
8
+ - Updated dependencies [6266a29]
9
+ - @aptos-labs/wallet-adapter-core@3.1.1
10
+
3
11
  ## 2.1.0
4
12
 
5
13
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AccountInfo, NetworkInfo, WalletName, WalletInfo, Wallet, InputTransactionData, InputGenerateTransactionOptions, AnyRawTransaction, Types, AccountAuthenticator, InputSubmitTransactionData, PendingTransactionResponse, SignMessagePayload, SignMessageResponse } from '@aptos-labs/wallet-adapter-core';
1
+ import { AccountInfo, NetworkInfo, WalletName, WalletInfo, Wallet, InputTransactionData, AnyRawTransaction, Types, InputGenerateTransactionOptions, AccountAuthenticator, InputSubmitTransactionData, PendingTransactionResponse, SignMessagePayload, SignMessageResponse } from '@aptos-labs/wallet-adapter-core';
2
2
  export { NetworkName, Wallet, WalletName, WalletReadyState, isInAppBrowser, isMobile, isRedirectable } from '@aptos-labs/wallet-adapter-core';
3
3
  import { ReactNode, FC } from 'react';
4
4
 
@@ -11,7 +11,7 @@ interface WalletContextState {
11
11
  disconnect(): void;
12
12
  wallet: WalletInfo | null;
13
13
  wallets: ReadonlyArray<Wallet>;
14
- signAndSubmitTransaction(transaction: InputTransactionData, options?: InputGenerateTransactionOptions): Promise<any>;
14
+ signAndSubmitTransaction(transaction: InputTransactionData): Promise<any>;
15
15
  signTransaction(transactionOrPayload: AnyRawTransaction | Types.TransactionPayload, asFeePayer?: boolean, options?: InputGenerateTransactionOptions): Promise<AccountAuthenticator>;
16
16
  submitTransaction(transaction: InputSubmitTransactionData): Promise<PendingTransactionResponse>;
17
17
  signMessage(message: SignMessagePayload): Promise<SignMessageResponse>;
package/dist/index.js CHANGED
@@ -127,9 +127,9 @@ var AptosWalletAdapterProvider = ({
127
127
  return Promise.reject(error);
128
128
  }
129
129
  };
130
- const signAndSubmitTransaction = async (transaction, options) => {
130
+ const signAndSubmitTransaction = async (transaction) => {
131
131
  try {
132
- return await walletCore.signAndSubmitTransaction(transaction, options);
132
+ return await walletCore.signAndSubmitTransaction(transaction);
133
133
  } catch (error) {
134
134
  if (onError)
135
135
  onError(error);
package/dist/index.mjs CHANGED
@@ -106,9 +106,9 @@ var AptosWalletAdapterProvider = ({
106
106
  return Promise.reject(error);
107
107
  }
108
108
  };
109
- const signAndSubmitTransaction = async (transaction, options) => {
109
+ const signAndSubmitTransaction = async (transaction) => {
110
110
  try {
111
- return await walletCore.signAndSubmitTransaction(transaction, options);
111
+ return await walletCore.signAndSubmitTransaction(transaction);
112
112
  } catch (error) {
113
113
  if (onError)
114
114
  onError(error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aptos-labs/wallet-adapter-react",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Aptos Wallet Adapter React Provider",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -37,7 +37,7 @@
37
37
  "@aptos-labs/wallet-adapter-tsconfig": "0.0.0"
38
38
  },
39
39
  "dependencies": {
40
- "@aptos-labs/wallet-adapter-core": "3.1.0"
40
+ "@aptos-labs/wallet-adapter-core": "3.1.1"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "react": "^18"
@@ -131,11 +131,10 @@ export const AptosWalletAdapterProvider: FC<AptosWalletProviderProps> = ({
131
131
  };
132
132
 
133
133
  const signAndSubmitTransaction = async (
134
- transaction: InputTransactionData,
135
- options?: InputGenerateTransactionOptions
134
+ transaction: InputTransactionData
136
135
  ) => {
137
136
  try {
138
- return await walletCore.signAndSubmitTransaction(transaction, options);
137
+ return await walletCore.signAndSubmitTransaction(transaction);
139
138
  } catch (error: any) {
140
139
  if (onError) onError(error);
141
140
  return Promise.reject(error);
package/src/useWallet.tsx CHANGED
@@ -39,10 +39,7 @@ export interface WalletContextState {
39
39
  disconnect(): void;
40
40
  wallet: WalletInfo | null;
41
41
  wallets: ReadonlyArray<Wallet>;
42
- signAndSubmitTransaction(
43
- transaction: InputTransactionData,
44
- options?: InputGenerateTransactionOptions
45
- ): Promise<any>;
42
+ signAndSubmitTransaction(transaction: InputTransactionData): Promise<any>;
46
43
  signTransaction(
47
44
  transactionOrPayload: AnyRawTransaction | Types.TransactionPayload,
48
45
  asFeePayer?: boolean,