privacycash 1.1.3 → 1.1.5
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/dist/depositSPL.js
CHANGED
|
@@ -97,8 +97,8 @@ export async function depositSPL({ lightWasm, storage, keyBasePath, publicKey, c
|
|
|
97
97
|
// Check SOL balance
|
|
98
98
|
const solBalance = await connection.getBalance(publicKey);
|
|
99
99
|
logger.debug(`SOL Wallet balance: ${solBalance / 1e9} SOL`);
|
|
100
|
-
if (solBalance / 1e9 < 0.
|
|
101
|
-
throw new Error(`Need at least 0.
|
|
100
|
+
if (solBalance / 1e9 < 0.002) {
|
|
101
|
+
throw new Error(`Need at least 0.002 SOL for Solana fees.`);
|
|
102
102
|
}
|
|
103
103
|
const { globalConfigAccount } = getProgramAccounts();
|
|
104
104
|
// Create the merkle tree with the pre-initialized poseidon hash
|
|
@@ -13,9 +13,9 @@ export declare const SIGN_MESSAGE = "Privacy Money account sign in";
|
|
|
13
13
|
export declare const LSK_FETCH_OFFSET = "fetch_offset";
|
|
14
14
|
export declare const LSK_ENCRYPTED_OUTPUTS = "encrypted_outputs";
|
|
15
15
|
export declare const USDC_MINT: PublicKey;
|
|
16
|
-
declare const tokenList: readonly ["sol", "usdc", "usdt"];
|
|
16
|
+
declare const tokenList: readonly ["sol", "usdc", "usdt", "zec"];
|
|
17
17
|
export type TokenList = typeof tokenList[number];
|
|
18
|
-
declare const splList: readonly ["usdc", "usdt"];
|
|
18
|
+
declare const splList: readonly ["usdc", "usdt", "zec"];
|
|
19
19
|
export type SplList = typeof splList[number];
|
|
20
20
|
export type Token = {
|
|
21
21
|
name: TokenList;
|
package/dist/utils/constants.js
CHANGED
|
@@ -14,8 +14,8 @@ export const SIGN_MESSAGE = `Privacy Money account sign in`;
|
|
|
14
14
|
export const LSK_FETCH_OFFSET = 'fetch_offset';
|
|
15
15
|
export const LSK_ENCRYPTED_OUTPUTS = 'encrypted_outputs';
|
|
16
16
|
export const USDC_MINT = process.env.NEXT_PUBLIC_USDC_MINT ? new PublicKey(process.env.NEXT_PUBLIC_USDC_MINT) : new PublicKey('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v');
|
|
17
|
-
const tokenList = ['sol', 'usdc', 'usdt'];
|
|
18
|
-
const splList = ['usdc', 'usdt'];
|
|
17
|
+
const tokenList = ['sol', 'usdc', 'usdt', 'zec'];
|
|
18
|
+
const splList = ['usdc', 'usdt', 'zec'];
|
|
19
19
|
export const tokens = [
|
|
20
20
|
{
|
|
21
21
|
name: 'sol',
|
|
@@ -34,5 +34,11 @@ export const tokens = [
|
|
|
34
34
|
pubkey: process.env.NEXT_PUBLIC_USDT_MINT ? new PublicKey(process.env.NEXT_PUBLIC_USDT_MINT) : new PublicKey('Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB'),
|
|
35
35
|
prefix: 'usdt_',
|
|
36
36
|
units_per_token: 1e6
|
|
37
|
-
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'zec',
|
|
40
|
+
pubkey: process.env.NEXT_PUBLIC_ZEC_MINT ? new PublicKey(process.env.NEXT_PUBLIC_ZEC_MINT) : new PublicKey('A7bdiYdS5GjqGFtxf17ppRHtDKPkkRqbKtR27dxvQXaS'),
|
|
41
|
+
prefix: 'zec_',
|
|
42
|
+
units_per_token: 1e8
|
|
43
|
+
},
|
|
38
44
|
];
|
package/package.json
CHANGED
package/src/depositSPL.ts
CHANGED
|
@@ -149,8 +149,8 @@ export async function depositSPL({ lightWasm, storage, keyBasePath, publicKey, c
|
|
|
149
149
|
const solBalance = await connection.getBalance(publicKey);
|
|
150
150
|
logger.debug(`SOL Wallet balance: ${solBalance / 1e9} SOL`);
|
|
151
151
|
|
|
152
|
-
if (solBalance / 1e9 < 0.
|
|
153
|
-
throw new Error(`Need at least 0.
|
|
152
|
+
if (solBalance / 1e9 < 0.002) {
|
|
153
|
+
throw new Error(`Need at least 0.002 SOL for Solana fees.`);
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
const { globalConfigAccount } = getProgramAccounts()
|
package/src/utils/constants.ts
CHANGED
|
@@ -27,9 +27,9 @@ export const LSK_ENCRYPTED_OUTPUTS = 'encrypted_outputs'
|
|
|
27
27
|
|
|
28
28
|
export const USDC_MINT = process.env.NEXT_PUBLIC_USDC_MINT ? new PublicKey(process.env.NEXT_PUBLIC_USDC_MINT) : new PublicKey('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v')
|
|
29
29
|
|
|
30
|
-
const tokenList = ['sol', 'usdc', 'usdt'] as const;
|
|
30
|
+
const tokenList = ['sol', 'usdc', 'usdt', 'zec'] as const;
|
|
31
31
|
export type TokenList = typeof tokenList[number];
|
|
32
|
-
const splList = ['usdc', 'usdt'] as const;
|
|
32
|
+
const splList = ['usdc', 'usdt', 'zec'] as const;
|
|
33
33
|
export type SplList = typeof splList[number];
|
|
34
34
|
export type Token = {
|
|
35
35
|
name: TokenList
|
|
@@ -55,5 +55,11 @@ export const tokens: Token[] = [
|
|
|
55
55
|
pubkey: process.env.NEXT_PUBLIC_USDT_MINT ? new PublicKey(process.env.NEXT_PUBLIC_USDT_MINT) : new PublicKey('Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB'),
|
|
56
56
|
prefix: 'usdt_',
|
|
57
57
|
units_per_token: 1e6
|
|
58
|
-
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'zec',
|
|
61
|
+
pubkey: process.env.NEXT_PUBLIC_ZEC_MINT ? new PublicKey(process.env.NEXT_PUBLIC_ZEC_MINT) : new PublicKey('A7bdiYdS5GjqGFtxf17ppRHtDKPkkRqbKtR27dxvQXaS'),
|
|
62
|
+
prefix: 'zec_',
|
|
63
|
+
units_per_token: 1e8
|
|
64
|
+
},
|
|
59
65
|
]
|