@injectivelabs/wallet-cosmos-strategy 1.20.15 → 1.20.17
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/cjs/index.cjs +13 -13
- package/dist/cjs/index.d.cts +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/package.json +5 -5
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
let __injectivelabs_exceptions = require("@injectivelabs/exceptions");
|
|
2
2
|
let __injectivelabs_wallet_core_strategy = require("@injectivelabs/wallet-core/strategy");
|
|
3
|
-
let
|
|
3
|
+
let __injectivelabs_wallet_base_runtime_light = require("@injectivelabs/wallet-base/runtime-light");
|
|
4
4
|
|
|
5
5
|
//#region src/strategy/lib.ts
|
|
6
6
|
let cachedCosmosWalletStrategy = null;
|
|
@@ -54,28 +54,28 @@ function _defineProperty(e, r, t) {
|
|
|
54
54
|
//#endregion
|
|
55
55
|
//#region src/strategy/WalletStrategy.ts
|
|
56
56
|
const createStrategy = async ({ args, wallet }) => {
|
|
57
|
-
if (!(0,
|
|
57
|
+
if (!(0, __injectivelabs_wallet_base_runtime_light.isCosmosWallet)(wallet)) return;
|
|
58
58
|
const CosmosWalletStrategy = await loadCosmosWalletStrategy();
|
|
59
59
|
switch (wallet) {
|
|
60
|
-
case
|
|
60
|
+
case __injectivelabs_wallet_base_runtime_light.Wallet.Keplr: return new CosmosWalletStrategy({
|
|
61
61
|
...args,
|
|
62
|
-
wallet:
|
|
62
|
+
wallet: __injectivelabs_wallet_base_runtime_light.Wallet.Keplr
|
|
63
63
|
});
|
|
64
|
-
case
|
|
64
|
+
case __injectivelabs_wallet_base_runtime_light.Wallet.Cosmostation: return new CosmosWalletStrategy({
|
|
65
65
|
...args,
|
|
66
|
-
wallet:
|
|
66
|
+
wallet: __injectivelabs_wallet_base_runtime_light.Wallet.Cosmostation
|
|
67
67
|
});
|
|
68
|
-
case
|
|
68
|
+
case __injectivelabs_wallet_base_runtime_light.Wallet.Leap: return new CosmosWalletStrategy({
|
|
69
69
|
...args,
|
|
70
|
-
wallet:
|
|
70
|
+
wallet: __injectivelabs_wallet_base_runtime_light.Wallet.Leap
|
|
71
71
|
});
|
|
72
|
-
case
|
|
72
|
+
case __injectivelabs_wallet_base_runtime_light.Wallet.Ninji: return new CosmosWalletStrategy({
|
|
73
73
|
...args,
|
|
74
|
-
wallet:
|
|
74
|
+
wallet: __injectivelabs_wallet_base_runtime_light.Wallet.Ninji
|
|
75
75
|
});
|
|
76
|
-
case
|
|
76
|
+
case __injectivelabs_wallet_base_runtime_light.Wallet.OWallet: return new CosmosWalletStrategy({
|
|
77
77
|
...args,
|
|
78
|
-
wallet:
|
|
78
|
+
wallet: __injectivelabs_wallet_base_runtime_light.Wallet.OWallet
|
|
79
79
|
});
|
|
80
80
|
default: return;
|
|
81
81
|
}
|
|
@@ -90,7 +90,7 @@ var BaseCosmosWalletStrategy = class extends __injectivelabs_wallet_core_strateg
|
|
|
90
90
|
_defineProperty(this, "loadingStrategies", /* @__PURE__ */ new Map());
|
|
91
91
|
}
|
|
92
92
|
async setWallet(wallet) {
|
|
93
|
-
this.wallet = (0,
|
|
93
|
+
this.wallet = (0, __injectivelabs_wallet_base_runtime_light.isCosmosWallet)(wallet) ? wallet : __injectivelabs_wallet_base_runtime_light.Wallet.Keplr;
|
|
94
94
|
await this.loadStrategy(this.wallet);
|
|
95
95
|
}
|
|
96
96
|
getStrategy() {
|
package/dist/cjs/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseWalletStrategy } from "@injectivelabs/wallet-core/strategy";
|
|
2
|
-
import { ConcreteWalletStrategy, Wallet } from "@injectivelabs/wallet-base/light";
|
|
2
|
+
import { ConcreteWalletStrategy, Wallet } from "@injectivelabs/wallet-base/runtime-light";
|
|
3
3
|
import { CosmosChainId } from "@injectivelabs/ts-types";
|
|
4
4
|
|
|
5
5
|
//#region src/strategy/types.d.ts
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseWalletStrategy } from "@injectivelabs/wallet-core/strategy";
|
|
2
|
-
import { ConcreteWalletStrategy, Wallet } from "@injectivelabs/wallet-base/light";
|
|
2
|
+
import { ConcreteWalletStrategy, Wallet } from "@injectivelabs/wallet-base/runtime-light";
|
|
3
3
|
import { CosmosChainId } from "@injectivelabs/ts-types";
|
|
4
4
|
|
|
5
5
|
//#region src/strategy/types.d.ts
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GeneralException } from "@injectivelabs/exceptions";
|
|
2
2
|
import { BaseWalletStrategy } from "@injectivelabs/wallet-core/strategy";
|
|
3
|
-
import { Wallet, isCosmosWallet } from "@injectivelabs/wallet-base/light";
|
|
3
|
+
import { Wallet, isCosmosWallet } from "@injectivelabs/wallet-base/runtime-light";
|
|
4
4
|
|
|
5
5
|
//#region src/strategy/lib.ts
|
|
6
6
|
let cachedCosmosWalletStrategy = null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@injectivelabs/wallet-cosmos-strategy",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.17",
|
|
4
4
|
"description": "Wallet Cosmos Strategy with instantiated wallets",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
"dist"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@injectivelabs/
|
|
46
|
-
"@injectivelabs/
|
|
47
|
-
"@injectivelabs/wallet-cosmos": "1.20.
|
|
48
|
-
"@injectivelabs/wallet-
|
|
45
|
+
"@injectivelabs/ts-types": "1.20.17",
|
|
46
|
+
"@injectivelabs/wallet-base": "1.20.17",
|
|
47
|
+
"@injectivelabs/wallet-cosmos": "1.20.17",
|
|
48
|
+
"@injectivelabs/wallet-core": "1.20.17"
|
|
49
49
|
},
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"access": "public"
|