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 24, 2024
1 parent d2e1209 commit f8dba25
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 f8dba25

Please sign in to comment.