Skip to content

Commit

Permalink
refactor: Deprecate wallet config
Browse files Browse the repository at this point in the history
  • Loading branch information
janniks committed Oct 23, 2024
1 parent a847ce5 commit 620a507
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/wallet-sdk/src/models/wallet-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { GaiaHubConfig, connectToGaiaHub, uploadToGaiaHub } from '@stacks/storag
import { decryptContent, encryptContent, getPublicKeyFromPrivate } from '@stacks/encryption';
import { createFetchFn, FetchFn } from '@stacks/common';

/** @deprecated */
export interface ConfigApp {
origin: string;
scopes: string[];
Expand All @@ -11,20 +12,23 @@ export interface ConfigApp {
name: string;
}

/** @deprecated */
export interface ConfigAccount {
username?: string;
apps: {
[origin: string]: ConfigApp;
};
}

/** @deprecated */
export interface WalletConfig {
accounts: ConfigAccount[];
meta?: {
[key: string]: any;
};
}

/** @deprecated */
export const createWalletGaiaConfig = async ({
gaiaHubUrl,
wallet,
Expand Down Expand Up @@ -107,6 +111,7 @@ export const updateWalletConfig = async ({
return walletConfig;
};

/** @deprecated */
export function makeWalletConfig(wallet: Wallet): WalletConfig {
return {
accounts: wallet.accounts.map(account => ({
Expand All @@ -116,6 +121,7 @@ export function makeWalletConfig(wallet: Wallet): WalletConfig {
};
}

/** @deprecated */
export const encryptWalletConfig = async ({
wallet,
walletConfig,
Expand All @@ -128,6 +134,7 @@ export const encryptWalletConfig = async ({
return encrypted;
};

/** @deprecated */
export const updateWalletConfigWithApp = async ({
wallet,
account,
Expand Down

0 comments on commit 620a507

Please sign in to comment.