@getpara/cosmos-wallet-connectors 2.0.0-alpha.3 → 2.0.0-dev.1
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/index.js +13 -13
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -160,14 +160,12 @@ function CosmosExternalWalletProvider({
|
|
|
160
160
|
});
|
|
161
161
|
const login = (bufferAddress2, address2, isFullAuthWallet, providerName) => __async(this, null, function* () {
|
|
162
162
|
try {
|
|
163
|
-
return yield para.
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
withFullParaAuth: isFullAuthWallet
|
|
170
|
-
}
|
|
163
|
+
return yield para.externalWalletLogin({
|
|
164
|
+
address: bufferAddress2,
|
|
165
|
+
type: WalletType.COSMOS,
|
|
166
|
+
provider: providerName,
|
|
167
|
+
addressBech32: address2,
|
|
168
|
+
withFullParaAuth: isFullAuthWallet
|
|
171
169
|
});
|
|
172
170
|
} catch (err) {
|
|
173
171
|
yield reset();
|
|
@@ -238,7 +236,8 @@ function CosmosExternalWalletProvider({
|
|
|
238
236
|
let address2;
|
|
239
237
|
let bufferAddress2;
|
|
240
238
|
let error;
|
|
241
|
-
let
|
|
239
|
+
let userExists = false;
|
|
240
|
+
let isVerified = false;
|
|
242
241
|
if (!walletType2) {
|
|
243
242
|
console.error("Graz wallet type not provided.");
|
|
244
243
|
return;
|
|
@@ -262,10 +261,11 @@ function CosmosExternalWalletProvider({
|
|
|
262
261
|
bufferAddress2 = connectedWallet2.accounts[firstChain].address.toString();
|
|
263
262
|
if (connectedWallet2.accounts[firstChain]) {
|
|
264
263
|
try {
|
|
265
|
-
|
|
266
|
-
|
|
264
|
+
const loginResp = yield login(bufferAddress2, address2, isFullAuthWallet, getProviderName(walletType2));
|
|
265
|
+
userExists = loginResp.userExists;
|
|
266
|
+
isVerified = loginResp.isVerified;
|
|
267
|
+
verificationMessage.current = loginResp.signatureVerificationMessage;
|
|
267
268
|
} catch (err) {
|
|
268
|
-
authState = void 0;
|
|
269
269
|
bufferAddress2 = void 0;
|
|
270
270
|
address2 = void 0;
|
|
271
271
|
error = err;
|
|
@@ -281,7 +281,7 @@ function CosmosExternalWalletProvider({
|
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
updateExternalWalletState({ isConnecting: false });
|
|
284
|
-
return {
|
|
284
|
+
return { address: address2, bufferAddress: bufferAddress2, error, userExists, isVerified };
|
|
285
285
|
});
|
|
286
286
|
const getWallet = (walletType2) => incompleteWallets.find((w) => w.grazType === walletType2 || w.grazMobileType === walletType2);
|
|
287
287
|
const getProviderName = (walletType2) => {
|
package/dist/index.js.br
CHANGED
|
Binary file
|
package/dist/index.js.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/cosmos-wallet-connectors",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-dev.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
"@cosmjs/stargate": "<=0.31.3",
|
|
21
21
|
"@cosmjs/tendermint-rpc": "<=0.31.3",
|
|
22
22
|
"@getpara/graz": "^1.0.0-dev.1",
|
|
23
|
-
"@getpara/web-sdk": "2.0.0-
|
|
23
|
+
"@getpara/web-sdk": "^2.0.0-dev.1",
|
|
24
24
|
"@leapwallet/cosmos-social-login-capsule-provider": "^0.0.41",
|
|
25
25
|
"zustand": "^4.5.2",
|
|
26
26
|
"zustand-sync-tabs": "^0.2.2"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@getpara/react-common": "2.0.0-
|
|
29
|
+
"@getpara/react-common": "^2.0.0-dev.1",
|
|
30
30
|
"@types/react": "^18.0.31",
|
|
31
31
|
"@types/react-dom": "^18.2.7",
|
|
32
32
|
"typescript": "^5.4.3"
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"dist",
|
|
40
40
|
"package.json"
|
|
41
41
|
],
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "426e843bd6084fb2e5f30ab87b02c79fc2f52832"
|
|
43
43
|
}
|