@getpara/react-sdk-lite 2.19.0 → 2.20.0
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/cli/cli.mjs +0 -0
- package/dist/modal/ParaModal.js +1 -1
- package/dist/modal/components/flows/account/AddFunds/AddFundsReceive.js +2 -1
- package/dist/modal/components/flows/account/Send/context.js +4 -4
- package/dist/modal/components/flows/account/Wallet/Wallet.js +4 -0
- package/dist/modal/constants/walletTypeConfig.js +2 -1
- package/dist/provider/hooks/utils/useWalletState.d.ts +1 -1
- package/dist/provider/stores/getters.d.ts +1 -1
- package/package.json +19 -19
package/dist/cli/cli.mjs
CHANGED
|
File without changes
|
package/dist/modal/ParaModal.js
CHANGED
|
@@ -14,7 +14,8 @@ import { useStore } from "../../../../../provider/stores/useStore.js";
|
|
|
14
14
|
const GENERIC_WALLET = {
|
|
15
15
|
EVM: "Ethereum or EVM-based networks",
|
|
16
16
|
SOLANA: "Solana or SVM-based networks",
|
|
17
|
-
COSMOS: "Cosmos networks"
|
|
17
|
+
COSMOS: "Cosmos networks",
|
|
18
|
+
STELLAR: "the Stellar network"
|
|
18
19
|
};
|
|
19
20
|
const AddFundsReceive = () => {
|
|
20
21
|
const { networks } = useAddFunds();
|
|
@@ -18,7 +18,7 @@ import { useProfileBalance, useWalletState } from "../../../../../provider/index
|
|
|
18
18
|
import { useSendMutations } from "../../../../hooks/index.js";
|
|
19
19
|
import { useStore } from "../../../../../provider/stores/useStore.js";
|
|
20
20
|
const getDefaultSendMetadata = (balances, wallet) => {
|
|
21
|
-
if (!balances || !(wallet == null ? void 0 : wallet.type) || !(wallet == null ? void 0 : wallet.address) || (wallet == null ? void 0 : wallet.type) === "COSMOS") {
|
|
21
|
+
if (!balances || !(wallet == null ? void 0 : wallet.type) || !(wallet == null ? void 0 : wallet.address) || (wallet == null ? void 0 : wallet.type) === "COSMOS" || (wallet == null ? void 0 : wallet.type) === "STELLAR") {
|
|
22
22
|
return { asset: null, network: null };
|
|
23
23
|
}
|
|
24
24
|
const walletBalance = balances.wallets.find(({ address }) => address === (wallet == null ? void 0 : wallet.address));
|
|
@@ -133,7 +133,7 @@ function AccountSendProvider({ children, step }) {
|
|
|
133
133
|
broadcastMutate
|
|
134
134
|
]);
|
|
135
135
|
const availableWallets = useMemo(() => {
|
|
136
|
-
return para.availableWallets.filter(({ type }) => type !== "COSMOS");
|
|
136
|
+
return para.availableWallets.filter(({ type }) => type !== "COSMOS" && type !== "STELLAR");
|
|
137
137
|
}, [para.availableWallets]);
|
|
138
138
|
const { assetPrice, assetValueOnNetwork, assetAmountOnNetwork } = useMemo(() => {
|
|
139
139
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g;
|
|
@@ -152,7 +152,7 @@ function AccountSendProvider({ children, step }) {
|
|
|
152
152
|
};
|
|
153
153
|
}, [sendMetadata.asset, sendMetadata.network]);
|
|
154
154
|
useEffect(() => {
|
|
155
|
-
if (availableWallets.length > 0 && selectedWallet.type === "COSMOS") {
|
|
155
|
+
if (availableWallets.length > 0 && (selectedWallet.type === "COSMOS" || selectedWallet.type === "STELLAR")) {
|
|
156
156
|
const defaultWallet = availableWallets.find((wallet) => wallet.type !== "EVM");
|
|
157
157
|
(defaultWallet == null ? void 0 : defaultWallet.id) && (defaultWallet == null ? void 0 : defaultWallet.type) && setSelectedWallet(defaultWallet);
|
|
158
158
|
}
|
|
@@ -269,7 +269,7 @@ function AccountSendProvider({ children, step }) {
|
|
|
269
269
|
walletId: selectedWallet.id,
|
|
270
270
|
userId: para.userId,
|
|
271
271
|
opts: {
|
|
272
|
-
type: selectedWallet.type === "COSMOS" ? "EVM" : selectedWallet.type,
|
|
272
|
+
type: selectedWallet.type === "COSMOS" ? "EVM" : selectedWallet.type === "STELLAR" ? "SOLANA" : selectedWallet.type,
|
|
273
273
|
config: balancesConfig,
|
|
274
274
|
sourceAddress: selectedWallet.address,
|
|
275
275
|
destinationAddress,
|
|
@@ -22,6 +22,10 @@ const EXPLORERS = {
|
|
|
22
22
|
COSMOS: {
|
|
23
23
|
name: "Atomscan",
|
|
24
24
|
url: (address) => `https://atomscan.com/accounts/${address}`
|
|
25
|
+
},
|
|
26
|
+
STELLAR: {
|
|
27
|
+
name: "Stellar Expert",
|
|
28
|
+
url: (address) => `https://stellar.expert/explorer/public/account/${address}`
|
|
25
29
|
}
|
|
26
30
|
};
|
|
27
31
|
const Wallet = () => {
|
|
@@ -6,7 +6,8 @@ const WALLET_TYPE_CONFIG = {
|
|
|
6
6
|
icon: "ethCircle"
|
|
7
7
|
},
|
|
8
8
|
SOLANA: { name: "Solana", icon: "solanaCircle" },
|
|
9
|
-
COSMOS: { name: "Cosmos", icon: "cosmosCircle" }
|
|
9
|
+
COSMOS: { name: "Cosmos", icon: "cosmosCircle" },
|
|
10
|
+
STELLAR: { name: "Stellar", icon: "stellarCircle" }
|
|
10
11
|
};
|
|
11
12
|
export {
|
|
12
13
|
WALLET_TYPE_CONFIG
|
|
@@ -5,7 +5,7 @@ import { TWalletType } from '@getpara/web-sdk';
|
|
|
5
5
|
export declare const useWalletState: () => {
|
|
6
6
|
selectedWallet: {
|
|
7
7
|
id: string | undefined;
|
|
8
|
-
type: "EVM" | "SOLANA" | "COSMOS" | undefined;
|
|
8
|
+
type: "EVM" | "SOLANA" | "COSMOS" | "STELLAR" | undefined;
|
|
9
9
|
address: string | undefined;
|
|
10
10
|
};
|
|
11
11
|
setSelectedWallet: ({ id, type }: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const getClient: () => import("graz").ParaWeb | undefined;
|
|
2
2
|
export declare const getIsOpen: () => boolean;
|
|
3
3
|
export declare const getSelectedWalletId: () => string | undefined;
|
|
4
|
-
export declare const getSelectedWalletType: () => "EVM" | "SOLANA" | "COSMOS" | undefined;
|
|
4
|
+
export declare const getSelectedWalletType: () => "EVM" | "SOLANA" | "COSMOS" | "STELLAR" | undefined;
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/react-sdk-lite",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.20.0",
|
|
4
4
|
"bin": {
|
|
5
5
|
"setup-para": "dist/cli/cli.mjs"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@getpara/react-common": "2.
|
|
9
|
-
"@getpara/react-components": "2.
|
|
10
|
-
"@getpara/react-core": "2.
|
|
11
|
-
"@getpara/web-sdk": "2.
|
|
8
|
+
"@getpara/react-common": "2.20.0",
|
|
9
|
+
"@getpara/react-components": "2.20.0",
|
|
10
|
+
"@getpara/react-core": "2.20.0",
|
|
11
|
+
"@getpara/web-sdk": "2.20.0",
|
|
12
12
|
"date-fns": "^3.6.0",
|
|
13
13
|
"detect-browser": "^5.3.0",
|
|
14
14
|
"framer-motion": "^11.3.31",
|
|
@@ -19,19 +19,19 @@
|
|
|
19
19
|
"zustand-sync-tabs": "^0.2.2"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@getpara/aa-alchemy": "2.
|
|
23
|
-
"@getpara/aa-biconomy": "2.
|
|
24
|
-
"@getpara/aa-cdp": "2.
|
|
25
|
-
"@getpara/aa-gelato": "2.
|
|
26
|
-
"@getpara/aa-pimlico": "2.
|
|
27
|
-
"@getpara/aa-porto": "2.
|
|
28
|
-
"@getpara/aa-rhinestone": "2.
|
|
29
|
-
"@getpara/aa-safe": "2.
|
|
30
|
-
"@getpara/aa-thirdweb": "2.
|
|
31
|
-
"@getpara/aa-zerodev": "2.
|
|
32
|
-
"@getpara/cosmos-wallet-connectors": "2.
|
|
33
|
-
"@getpara/evm-wallet-connectors": "2.
|
|
34
|
-
"@getpara/solana-wallet-connectors": "2.
|
|
22
|
+
"@getpara/aa-alchemy": "2.20.0",
|
|
23
|
+
"@getpara/aa-biconomy": "2.20.0",
|
|
24
|
+
"@getpara/aa-cdp": "2.20.0",
|
|
25
|
+
"@getpara/aa-gelato": "2.20.0",
|
|
26
|
+
"@getpara/aa-pimlico": "2.20.0",
|
|
27
|
+
"@getpara/aa-porto": "2.20.0",
|
|
28
|
+
"@getpara/aa-rhinestone": "2.20.0",
|
|
29
|
+
"@getpara/aa-safe": "2.20.0",
|
|
30
|
+
"@getpara/aa-thirdweb": "2.20.0",
|
|
31
|
+
"@getpara/aa-zerodev": "2.20.0",
|
|
32
|
+
"@getpara/cosmos-wallet-connectors": "2.20.0",
|
|
33
|
+
"@getpara/evm-wallet-connectors": "2.20.0",
|
|
34
|
+
"@getpara/solana-wallet-connectors": "2.20.0",
|
|
35
35
|
"@tanstack/react-query": "^5.74.0",
|
|
36
36
|
"@testing-library/dom": "^10.4.0",
|
|
37
37
|
"@testing-library/react": "^16.3.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"package.json",
|
|
52
52
|
"styles.css"
|
|
53
53
|
],
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "a8443bcc4018864f5e582f238ade1bb3b4e121f4",
|
|
55
55
|
"main": "dist/index.js",
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"@getpara/aa-alchemy": ">=2.15.0",
|