decentraland-dapps 22.1.0 → 23.0.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/hooks/useManaFiatGatewayPurchase.d.ts +1 -0
- package/dist/hooks/useManaFiatGatewayPurchase.js +21 -0
- package/dist/hooks/useManaFiatGatewayPurchase.js.map +1 -0
- package/dist/modules/index.d.ts +1 -2
- package/dist/modules/index.js +1 -2
- package/dist/modules/index.js.map +1 -1
- package/package.json +1 -3
- package/dist/modules/location/index.d.ts +0 -2
- package/dist/modules/location/index.js +0 -3
- package/dist/modules/location/index.js.map +0 -1
- package/dist/modules/location/sagas.d.ts +0 -1
- package/dist/modules/location/sagas.js +0 -18
- package/dist/modules/location/sagas.js.map +0 -1
- package/dist/modules/location/types.d.ts +0 -9
- package/dist/modules/location/types.js +0 -2
- package/dist/modules/location/types.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useManaFiatGatewayPurchase(): void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useHistory, useLocation } from 'react-router';
|
|
2
|
+
import { useDispatch } from 'react-redux';
|
|
3
|
+
import { manaFiatGatewayPurchaseCompleted } from '../modules/gateway';
|
|
4
|
+
export default function useManaFiatGatewayPurchase() {
|
|
5
|
+
const location = useLocation();
|
|
6
|
+
const query = new URLSearchParams(location.search);
|
|
7
|
+
const network = query.get('network');
|
|
8
|
+
const gateway = query.get('gateway');
|
|
9
|
+
const transactionId = query.get('transactionId');
|
|
10
|
+
const transactionStatus = query.get('transactionStatus');
|
|
11
|
+
const history = useHistory();
|
|
12
|
+
const dispatch = useDispatch();
|
|
13
|
+
if (transactionId && transactionStatus && network && gateway) {
|
|
14
|
+
const queryParams = new URLSearchParams(query);
|
|
15
|
+
const params = ['transactionId', 'transactionStatus', 'network', 'gateway'];
|
|
16
|
+
params.forEach(param => queryParams.delete(param));
|
|
17
|
+
history.replace(`${location.pathname}?${queryParams.toString()}`);
|
|
18
|
+
dispatch(manaFiatGatewayPurchaseCompleted(network, gateway, transactionId, transactionStatus));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=useManaFiatGatewayPurchase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useManaFiatGatewayPurchase.js","sourceRoot":"","sources":["../../src/hooks/useManaFiatGatewayPurchase.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAA;AAErE,MAAM,CAAC,OAAO,UAAU,0BAA0B;IAChD,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;IAC9B,MAAM,KAAK,GAAG,IAAI,eAAe,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;IAClD,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,SAAS,CAAY,CAAA;IAC/C,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,SAAS,CAAuB,CAAA;IAC1D,MAAM,aAAa,GAAG,KAAK,CAAC,GAAG,CAAC,eAAe,CAAW,CAAA;IAC1D,MAAM,iBAAiB,GAAG,KAAK,CAAC,GAAG,CACjC,mBAAmB,CACQ,CAAA;IAC7B,MAAM,OAAO,GAAG,UAAU,EAAE,CAAA;IAC5B,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;IAE9B,IAAI,aAAa,IAAI,iBAAiB,IAAI,OAAO,IAAI,OAAO,EAAE,CAAC;QAC7D,MAAM,WAAW,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC,CAAA;QAC9C,MAAM,MAAM,GAAG,CAAC,eAAe,EAAE,mBAAmB,EAAE,SAAS,EAAE,SAAS,CAAC,CAAA;QAE3E,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;QAElD,OAAO,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC,QAAQ,IAAI,WAAW,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;QAEjE,QAAQ,CACN,gCAAgC,CAC9B,OAAO,EACP,OAAO,EACP,aAAa,EACb,iBAAiB,CAClB,CACF,CAAA;IACH,CAAC;AACH,CAAC"}
|
package/dist/modules/index.d.ts
CHANGED
|
@@ -4,11 +4,10 @@ import * as features from './features';
|
|
|
4
4
|
import * as gateway from './gateway';
|
|
5
5
|
import * as identity from './identity';
|
|
6
6
|
import * as loading from './loading';
|
|
7
|
-
import * as location from './location';
|
|
8
7
|
import * as modal from './modal';
|
|
9
8
|
import * as profile from './profile';
|
|
10
9
|
import * as toast from './toast';
|
|
11
10
|
import * as transaction from './transaction';
|
|
12
11
|
import * as translation from './translation';
|
|
13
12
|
import * as wallet from './wallet';
|
|
14
|
-
export { analytics, authorization, features, gateway, identity, loading,
|
|
13
|
+
export { analytics, authorization, features, gateway, identity, loading, modal, profile, toast, transaction, translation, wallet };
|
package/dist/modules/index.js
CHANGED
|
@@ -4,12 +4,11 @@ import * as features from './features';
|
|
|
4
4
|
import * as gateway from './gateway';
|
|
5
5
|
import * as identity from './identity';
|
|
6
6
|
import * as loading from './loading';
|
|
7
|
-
import * as location from './location';
|
|
8
7
|
import * as modal from './modal';
|
|
9
8
|
import * as profile from './profile';
|
|
10
9
|
import * as toast from './toast';
|
|
11
10
|
import * as transaction from './transaction';
|
|
12
11
|
import * as translation from './translation';
|
|
13
12
|
import * as wallet from './wallet';
|
|
14
|
-
export { analytics, authorization, features, gateway, identity, loading,
|
|
13
|
+
export { analytics, authorization, features, gateway, identity, loading, modal, profile, toast, transaction, translation, wallet };
|
|
15
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,aAAa,CAAA;AACxC,OAAO,KAAK,aAAa,MAAM,iBAAiB,CAAA;AAChD,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAA;AACtC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA;AACpC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAA;AACtC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA;AACpC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,aAAa,CAAA;AACxC,OAAO,KAAK,aAAa,MAAM,iBAAiB,CAAA;AAChD,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAA;AACtC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA;AACpC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAA;AACtC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA;AACpC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAA;AAChC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA;AACpC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAA;AAChC,OAAO,KAAK,WAAW,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,WAAW,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,MAAM,MAAM,UAAU,CAAA;AAElC,OAAO,EACL,SAAS,EACT,aAAa,EACb,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,OAAO,EACP,KAAK,EACL,OAAO,EACP,KAAK,EACL,WAAW,EACX,WAAW,EACX,MAAM,EACP,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "decentraland-dapps",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "23.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -61,7 +61,6 @@
|
|
|
61
61
|
"@types/redux-storage-engine-localstorage": "^1.1.1",
|
|
62
62
|
"@types/uuid": "^9.0.5",
|
|
63
63
|
"@types/ws": "^8.5.3",
|
|
64
|
-
"connected-react-router": "^6.9.1",
|
|
65
64
|
"dcl-tslint-config-standard": "^1.0.1",
|
|
66
65
|
"history": "^4.10.1",
|
|
67
66
|
"husky": "^0.14.3",
|
|
@@ -90,7 +89,6 @@
|
|
|
90
89
|
"validate-commit-message": "^3.0.1"
|
|
91
90
|
},
|
|
92
91
|
"peerDependencies": {
|
|
93
|
-
"connected-react-router": "^6.9.1",
|
|
94
92
|
"history": "^4.10.1",
|
|
95
93
|
"react": "^17.0.2",
|
|
96
94
|
"react-redux": "^7.2.4",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/location/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function locationSaga(): Generator<import("redux-saga/effects").ForkEffect<never>, void, unknown>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { takeEvery, put, select } from 'redux-saga/effects';
|
|
2
|
-
import { getLocation, LOCATION_CHANGE, replace } from 'connected-react-router';
|
|
3
|
-
import { manaFiatGatewayPurchaseCompleted } from '../gateway/actions';
|
|
4
|
-
export function* locationSaga() {
|
|
5
|
-
yield takeEvery(LOCATION_CHANGE, handleLocationChange);
|
|
6
|
-
}
|
|
7
|
-
function* handleLocationChange(_action) {
|
|
8
|
-
const { query } = yield select(getLocation);
|
|
9
|
-
const { network, gateway, transactionId, transactionStatus } = query;
|
|
10
|
-
if (transactionId && transactionStatus && network && gateway) {
|
|
11
|
-
const queryParams = new URLSearchParams(query);
|
|
12
|
-
const params = ['transactionId', 'transactionStatus', 'network', 'gateway'];
|
|
13
|
-
params.forEach(param => queryParams.delete(param));
|
|
14
|
-
yield put(replace(`${location.pathname}?${queryParams.toString()}`));
|
|
15
|
-
yield put(manaFiatGatewayPurchaseCompleted(network, gateway, transactionId, transactionStatus));
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=sagas.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sagas.js","sourceRoot":"","sources":["../../../src/modules/location/sagas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,EACL,WAAW,EACX,eAAe,EAEf,OAAO,EACR,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAA;AAGrE,MAAM,SAAS,CAAC,CAAC,YAAY;IAC3B,MAAM,SAAS,CAAC,eAAe,EAAE,oBAAoB,CAAC,CAAA;AACxD,CAAC;AAED,QAAQ,CAAC,CAAC,oBAAoB,CAAC,OAA6B;IAC1D,MAAM,EAAE,KAAK,EAAE,GAAmC,MAAM,MAAM,CAAC,WAAW,CAAC,CAAA;IAC3E,MAAM,EACJ,OAAO,EACP,OAAO,EACP,aAAa,EACb,iBAAiB,EAClB,GAAG,KAAiC,CAAA;IAErC,IAAI,aAAa,IAAI,iBAAiB,IAAI,OAAO,IAAI,OAAO,EAAE,CAAC;QAC7D,MAAM,WAAW,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC,CAAA;QAC9C,MAAM,MAAM,GAAG,CAAC,eAAe,EAAE,mBAAmB,EAAE,SAAS,EAAE,SAAS,CAAC,CAAA;QAE3E,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;QAElD,MAAM,GAAG,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC,QAAQ,IAAI,WAAW,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAA;QAEpE,MAAM,GAAG,CACP,gCAAgC,CAC9B,OAAO,EACP,OAAO,EACP,aAAa,EACb,iBAAiB,CAClB,CACF,CAAA;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Network } from '@dcl/schemas/dist/dapps/network';
|
|
2
|
-
import { NetworkGatewayType } from 'decentraland-ui';
|
|
3
|
-
import { MoonPayTransactionStatus } from '../gateway/moonpay/types';
|
|
4
|
-
export type RedirectTransactionQuery = {
|
|
5
|
-
network?: Network;
|
|
6
|
-
gateway?: NetworkGatewayType;
|
|
7
|
-
transactionId?: string;
|
|
8
|
-
transactionStatus?: MoonPayTransactionStatus;
|
|
9
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modules/location/types.ts"],"names":[],"mappings":""}
|