Skip to content
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
5 changes: 3 additions & 2 deletions packages/wallet-sdk/src/createCoinbaseWalletSDK.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ describe('createCoinbaseWalletSDK', () => {
createCoinbaseWalletSDK({
...options,
subAccounts: {
// @ts-expect-error - enableAutoSubAccounts is not officially supported yet
enableAutoSubAccounts: true,
toOwnerAccount: {} as any,
},
Expand Down Expand Up @@ -233,7 +234,7 @@ describe('createCoinbaseWalletSDK', () => {
method: 'wallet_sendCalls',
params: [
{
version: "1",
version: '1',
chainId: '0x1',
calls: [
{
Expand Down Expand Up @@ -279,7 +280,7 @@ describe('createCoinbaseWalletSDK', () => {
method: 'wallet_sendCalls',
params: [
{
version: "1",
version: '1',
chainId: '0x1',
calls: [
{
Expand Down
3 changes: 2 additions & 1 deletion packages/wallet-sdk/src/createCoinbaseWalletSDK.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { SubAccount, ToOwnerAccountFn, store } from './store/store.js';

export type CreateCoinbaseWalletSDKOptions = Partial<AppMetadata> & {
preference?: Preference;
subAccounts?: SubAccountOptions;
subAccounts?: Omit<SubAccountOptions, 'enableAutoSubAccounts'>;
paymasterUrls?: Record<number, string>;
};

Expand Down Expand Up @@ -57,6 +57,7 @@ export function createCoinbaseWalletSDK(params: CreateCoinbaseWalletSDKOptions)

store.subAccountsConfig.set({
toOwnerAccount: params.subAccounts?.toOwnerAccount,
// @ts-expect-error - enableSubAccounts is not officially supported yet
enableAutoSubAccounts: params.subAccounts?.enableAutoSubAccounts,
defaultSpendPermissions: params.subAccounts?.defaultSpendPermissions,
});
Expand Down