Skip to content

Commit 3f79ef5

Browse files
authored
chore: disable enableAutoSubAccounts external prop (#1682)
* chore: disable enableAutoSubAccounts external prop * fix: typecheck
1 parent 811c879 commit 3f79ef5

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/wallet-sdk/src/createCoinbaseWalletSDK.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ describe('createCoinbaseWalletSDK', () => {
5151
createCoinbaseWalletSDK({
5252
...options,
5353
subAccounts: {
54+
// @ts-expect-error - enableAutoSubAccounts is not officially supported yet
5455
enableAutoSubAccounts: true,
5556
toOwnerAccount: {} as any,
5657
},
@@ -233,7 +234,7 @@ describe('createCoinbaseWalletSDK', () => {
233234
method: 'wallet_sendCalls',
234235
params: [
235236
{
236-
version: "1",
237+
version: '1',
237238
chainId: '0x1',
238239
calls: [
239240
{
@@ -279,7 +280,7 @@ describe('createCoinbaseWalletSDK', () => {
279280
method: 'wallet_sendCalls',
280281
params: [
281282
{
282-
version: "1",
283+
version: '1',
283284
chainId: '0x1',
284285
calls: [
285286
{

packages/wallet-sdk/src/createCoinbaseWalletSDK.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { SubAccount, ToOwnerAccountFn, store } from './store/store.js';
1919

2020
export type CreateCoinbaseWalletSDKOptions = Partial<AppMetadata> & {
2121
preference?: Preference;
22-
subAccounts?: SubAccountOptions;
22+
subAccounts?: Omit<SubAccountOptions, 'enableAutoSubAccounts'>;
2323
paymasterUrls?: Record<number, string>;
2424
};
2525

@@ -57,6 +57,7 @@ export function createCoinbaseWalletSDK(params: CreateCoinbaseWalletSDKOptions)
5757

5858
store.subAccountsConfig.set({
5959
toOwnerAccount: params.subAccounts?.toOwnerAccount,
60+
// @ts-expect-error - enableSubAccounts is not officially supported yet
6061
enableAutoSubAccounts: params.subAccounts?.enableAutoSubAccounts,
6162
defaultSpendPermissions: params.subAccounts?.defaultSpendPermissions,
6263
});

0 commit comments

Comments
 (0)