decentraland-dapps 13.57.0 → 13.58.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/modules/authorization/reducer.d.ts +1 -5
- package/dist/modules/authorization/reducer.js +2 -5
- package/dist/modules/authorization/reducer.js.map +1 -1
- package/dist/modules/wallet/utils/JsonRPCInvalidResponseError.d.ts +3 -0
- package/dist/modules/wallet/utils/JsonRPCInvalidResponseError.js +10 -0
- package/dist/modules/wallet/utils/JsonRPCInvalidResponseError.js.map +1 -0
- package/dist/modules/wallet/utils/switchProviderChainId.js +4 -0
- package/dist/modules/wallet/utils/switchProviderChainId.js.map +1 -1
- package/package.json +2 -2
|
@@ -15,9 +15,5 @@ export declare const INITIAL_STATE: {
|
|
|
15
15
|
authorizationFlowError: null;
|
|
16
16
|
};
|
|
17
17
|
declare type AuthorizationReducerAction = FetchAuthorizationsRequestAction | FetchAuthorizationsSuccessAction | FetchAuthorizationsFailureAction | GrantTokenRequestAction | GrantTokenSuccessAction | GrantTokenFailureAction | RevokeTokenRequestAction | RevokeTokenSuccessAction | RevokeTokenFailureAction | FetchTransactionSuccessAction | AuthorizationFlowRequestAction | AuthorizationFlowSuccessAction | AuthorizationFlowFailureAction;
|
|
18
|
-
export declare function authorizationReducer(state: AuthorizationState | undefined, action: AuthorizationReducerAction): AuthorizationState
|
|
19
|
-
loading: LoadingState;
|
|
20
|
-
error: null;
|
|
21
|
-
data: Authorization[];
|
|
22
|
-
};
|
|
18
|
+
export declare function authorizationReducer(state: AuthorizationState | undefined, action: AuthorizationReducerAction): AuthorizationState;
|
|
23
19
|
export {};
|
|
@@ -38,12 +38,9 @@ function authorizationReducer(state = exports.INITIAL_STATE, action) {
|
|
|
38
38
|
}
|
|
39
39
|
return acc;
|
|
40
40
|
}, []);
|
|
41
|
-
return {
|
|
42
|
-
loading: (0, reducer_1.loadingReducer)(state.loading, action),
|
|
43
|
-
error: null,
|
|
41
|
+
return Object.assign(Object.assign({}, state), { loading: (0, reducer_1.loadingReducer)(state.loading, action), error: null,
|
|
44
42
|
// concat the base and new authorizations, without duplications and removing the ones that are now null.
|
|
45
|
-
data: [...baseAuthorizations, ...newAuthorizations]
|
|
46
|
-
};
|
|
43
|
+
data: [...baseAuthorizations, ...newAuthorizations] });
|
|
47
44
|
}
|
|
48
45
|
case actions_2.GRANT_TOKEN_FAILURE:
|
|
49
46
|
case actions_2.REVOKE_TOKEN_FAILURE:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reducer.js","sourceRoot":"","sources":["../../../src/modules/authorization/reducer.ts"],"names":[],"mappings":";;;AAAA,gDAAiE;AACjE,oDAG+B;AAC/B,uCAyBkB;AAElB,mCAAkC;AASrB,QAAA,aAAa,GAAG;IAC3B,IAAI,EAAE,EAAE;IACR,OAAO,EAAE,EAAE;IACX,KAAK,EAAE,IAAI;IACX,sBAAsB,EAAE,IAAI;CAC7B,CAAA;AAiBD,SAAgB,oBAAoB,CAClC,QAA4B,qBAAa,EACzC,MAAkC;IAElC,QAAQ,MAAM,CAAC,IAAI,EAAE;QACnB,KAAK,6BAAmB,CAAC;QACzB,KAAK,8BAAoB,CAAC;QAC1B,KAAK,6BAAmB,CAAC;QACzB,KAAK,8BAAoB,CAAC;QAC1B,KAAK,sCAA4B,CAAC,CAAC;YACjC,uCACK,KAAK,KACR,KAAK,EAAE,IAAI,EACX,OAAO,EAAE,IAAA,wBAAc,EAAC,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,IAC/C;SACF;QACD,KAAK,oCAA0B,CAAC;QAChC,KAAK,oCAA0B;YAC7B,uCACK,KAAK,KACR,sBAAsB,EAAE,IAAI,EAC5B,OAAO,EAAE,IAAA,wBAAc,EAAC,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,IAC/C;QACH,KAAK,oCAA0B;YAC7B,uCACK,KAAK,KACR,sBAAsB,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,EAC5C,OAAO,EAAE,IAA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10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.JsonRPCInvalidResponseError = void 0;
|
|
4
|
+
class JsonRPCInvalidResponseError extends Error {
|
|
5
|
+
constructor(message) {
|
|
6
|
+
super(message);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
exports.JsonRPCInvalidResponseError = JsonRPCInvalidResponseError;
|
|
10
|
+
//# sourceMappingURL=JsonRPCInvalidResponseError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JsonRPCInvalidResponseError.js","sourceRoot":"","sources":["../../../../src/modules/wallet/utils/JsonRPCInvalidResponseError.ts"],"names":[],"mappings":";;;AAAA,MAAa,2BAA4B,SAAQ,KAAK;IACpD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAA;IAChB,CAAC;CACF;AAJD,kEAIC"}
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.switchProviderChainId = void 0;
|
|
13
13
|
const getProviderChainId_1 = require("./getProviderChainId");
|
|
14
14
|
const getAddEthereumChainParameters_1 = require("./getAddEthereumChainParameters");
|
|
15
|
+
const JsonRPCInvalidResponseError_1 = require("./JsonRPCInvalidResponseError");
|
|
15
16
|
/**
|
|
16
17
|
* Change the provider's chain to a provided chain.
|
|
17
18
|
* In case it returns an error that the chain does not exist, it will try to add it.
|
|
@@ -45,6 +46,9 @@ function switchProviderChainId(provider, chainId) {
|
|
|
45
46
|
catch (addError) {
|
|
46
47
|
throw new Error(`Error adding network: ${addError.message}`);
|
|
47
48
|
}
|
|
49
|
+
} // We're throwing specific error for this message because we don't know how to reproduce it and we don't want to get logged
|
|
50
|
+
else if ((switchError === null || switchError === void 0 ? void 0 : switchError.message) === 'JSON RPC response format is invalid') {
|
|
51
|
+
throw new JsonRPCInvalidResponseError_1.JsonRPCInvalidResponseError(switchError === null || switchError === void 0 ? void 0 : switchError.message);
|
|
48
52
|
}
|
|
49
53
|
throw new Error(`Error switching network: ${switchError.message}`);
|
|
50
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switchProviderChainId.js","sourceRoot":"","sources":["../../../../src/modules/wallet/utils/switchProviderChainId.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,6DAA0D;AAC1D,mFAAgF;
|
|
1
|
+
{"version":3,"file":"switchProviderChainId.js","sourceRoot":"","sources":["../../../../src/modules/wallet/utils/switchProviderChainId.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,6DAA0D;AAC1D,mFAAgF;AAChF,+EAA4E;AAE5E;;;;;;GAMG;AAEH,SAAsB,qBAAqB,CACzC,QAAkB,EAClB,OAAgB;;QAEhB,IAAI;YACF,MAAM,QAAQ,CAAC,OAAO,CAAC;gBACrB,MAAM,EAAE,4BAA4B;gBACpC,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,GAAG,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC;aACnD,CAAC,CAAC;YAEH,OAAO,OAAO,CAAC;SAChB;QAAC,OAAO,WAAW,EAAE;YACpB,2EAA2E;YAC3E,IAAI,QAAQ,IAAI,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,IAAI,MAAK,IAAI,EAAE;gBAC1C,IAAI;oBACF,MAAM,QAAQ,CAAC,OAAO,CAAC;wBACrB,MAAM,EAAE,yBAAyB;wBACjC,MAAM,EAAE,CAAC,IAAA,6DAA6B,EAAC,OAAO,CAAC,CAAC;qBACjD,CAAC,CAAC;oBACH,MAAM,UAAU,GAAG,MAAM,IAAA,uCAAkB,EAAC,QAAQ,CAAC,CAAC;oBAEtD,IAAI,OAAO,KAAK,UAAU,EAAE;wBAC1B,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;qBAChE;oBACD,OAAO,OAAO,CAAC;iBAChB;gBAAC,OAAO,QAAQ,EAAE;oBACjB,MAAM,IAAI,KAAK,CAAC,yBAAyB,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;iBAC9D;aACF,CAAA,2HAA2H;iBACvH,IAAI,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,MAAK,qCAAqC,EAAE;gBACvE,MAAM,IAAI,yDAA2B,CAAC,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,CAAC,CAAA;aAC5D;YACD,MAAM,IAAI,KAAK,CAAC,4BAA4B,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC;SACpE;IACH,CAAC;CAAA;AAlCD,sDAkCC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "decentraland-dapps",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.58.0",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@0xsequence/multicall": "^0.25.1",
|
|
6
6
|
"@0xsequence/relayer": "^0.25.1",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"decentraland-connect": "^3.5.0",
|
|
16
16
|
"decentraland-crypto-fetch": "^1.0.3",
|
|
17
17
|
"decentraland-transactions": "^1.44.0",
|
|
18
|
-
"decentraland-ui": "^3.102.
|
|
18
|
+
"decentraland-ui": "^3.102.1",
|
|
19
19
|
"ethers": "^5.6.8",
|
|
20
20
|
"events": "^3.3.0",
|
|
21
21
|
"flat": "^5.0.2",
|