@dynamic-labs/wallet-book 2.0.0-alpha.27 → 2.0.0-alpha.28
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/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
|
|
2
|
+
## [2.0.0-alpha.28](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.27...v2.0.0-alpha.28) (2024-04-10)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* improve bridge connect experience on mobile ([#5283](https://github.com/dynamic-labs/DynamicAuth/issues/5283)) ([155e4a9](https://github.com/dynamic-labs/DynamicAuth/commit/155e4a99e2cf5f78a1a5e91e774acbf170d6b083))
|
|
8
|
+
|
|
2
9
|
## [2.0.0-alpha.27](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.26...v2.0.0-alpha.27) (2024-04-09)
|
|
3
10
|
|
|
4
11
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/wallet-book",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.28",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"zod": "3.22.4",
|
|
29
|
-
"@dynamic-labs/iconic": "2.0.0-alpha.
|
|
30
|
-
"@dynamic-labs/logger": "2.0.0-alpha.
|
|
31
|
-
"@dynamic-labs/utils": "2.0.0-alpha.
|
|
29
|
+
"@dynamic-labs/iconic": "2.0.0-alpha.28",
|
|
30
|
+
"@dynamic-labs/logger": "2.0.0-alpha.28",
|
|
31
|
+
"@dynamic-labs/utils": "2.0.0-alpha.28",
|
|
32
32
|
"util": "0.12.5"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const getWalletBookWallet = (walletBook, walletKey) => {
|
|
6
|
-
var _a, _b;
|
|
5
|
+
const getWalletBookWallet = (walletBook, walletKey, walletFallback) => {
|
|
6
|
+
var _a, _b, _c;
|
|
7
7
|
if (!walletKey)
|
|
8
8
|
throw new Error('Wallet key is required. Please pass in a wallet key to getWalletBookWallet');
|
|
9
|
-
const walletData = (_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) === null || _a === void 0 ? void 0 : _a[walletKey];
|
|
9
|
+
const walletData = (_b = (_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) === null || _a === void 0 ? void 0 : _a[walletKey]) !== null && _b !== void 0 ? _b : walletFallback;
|
|
10
10
|
if (!walletData) {
|
|
11
|
-
throw new Error(`Wallet ${walletKey} not found in wallet book (${Object.keys((
|
|
11
|
+
throw new Error(`Wallet ${walletKey} not found in wallet book (${Object.keys((_c = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) !== null && _c !== void 0 ? _c : {}).length} wallets found)`);
|
|
12
12
|
}
|
|
13
13
|
return walletData;
|
|
14
14
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { WalletBookSchema, WalletSchema } from '../schemas';
|
|
2
|
-
export declare const getWalletBookWallet: (walletBook: WalletBookSchema, walletKey: string | undefined) => WalletSchema;
|
|
2
|
+
export declare const getWalletBookWallet: (walletBook: WalletBookSchema, walletKey: string | undefined, walletFallback?: WalletSchema) => WalletSchema;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const getWalletBookWallet = (walletBook, walletKey) => {
|
|
2
|
-
var _a, _b;
|
|
1
|
+
const getWalletBookWallet = (walletBook, walletKey, walletFallback) => {
|
|
2
|
+
var _a, _b, _c;
|
|
3
3
|
if (!walletKey)
|
|
4
4
|
throw new Error('Wallet key is required. Please pass in a wallet key to getWalletBookWallet');
|
|
5
|
-
const walletData = (_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) === null || _a === void 0 ? void 0 : _a[walletKey];
|
|
5
|
+
const walletData = (_b = (_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) === null || _a === void 0 ? void 0 : _a[walletKey]) !== null && _b !== void 0 ? _b : walletFallback;
|
|
6
6
|
if (!walletData) {
|
|
7
|
-
throw new Error(`Wallet ${walletKey} not found in wallet book (${Object.keys((
|
|
7
|
+
throw new Error(`Wallet ${walletKey} not found in wallet book (${Object.keys((_c = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) !== null && _c !== void 0 ? _c : {}).length} wallets found)`);
|
|
8
8
|
}
|
|
9
9
|
return walletData;
|
|
10
10
|
};
|
package/wallet-book-fallbacks.js
CHANGED