@bosonprotocol/react-kit 0.42.0-alpha.1 → 0.42.0-alpha.2
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/components/cta/offer/PreMintButton.d.ts +2 -0
- package/dist/cjs/components/cta/offer/PreMintButton.d.ts.map +1 -1
- package/dist/cjs/components/cta/offer/PreMintButton.js +5 -1
- package/dist/cjs/components/cta/offer/PreMintButton.js.map +1 -1
- package/dist/cjs/hooks/core-sdk/useCoreSdk.d.ts +3 -1
- package/dist/cjs/hooks/core-sdk/useCoreSdk.d.ts.map +1 -1
- package/dist/cjs/hooks/core-sdk/useCoreSdk.js +8 -6
- package/dist/cjs/hooks/core-sdk/useCoreSdk.js.map +1 -1
- package/dist/cjs/hooks/index.d.ts +1 -0
- package/dist/cjs/hooks/index.d.ts.map +1 -1
- package/dist/cjs/hooks/index.js +1 -0
- package/dist/cjs/hooks/index.js.map +1 -1
- package/dist/cjs/hooks/useOffers.d.ts +6 -0
- package/dist/cjs/hooks/useOffers.d.ts.map +1 -0
- package/dist/cjs/hooks/useOffers.js +22 -0
- package/dist/cjs/hooks/useOffers.js.map +1 -0
- package/dist/esm/components/cta/offer/PreMintButton.d.ts +2 -0
- package/dist/esm/components/cta/offer/PreMintButton.d.ts.map +1 -1
- package/dist/esm/components/cta/offer/PreMintButton.js +5 -1
- package/dist/esm/components/cta/offer/PreMintButton.js.map +1 -1
- package/dist/esm/hooks/core-sdk/useCoreSdk.d.ts +3 -1
- package/dist/esm/hooks/core-sdk/useCoreSdk.d.ts.map +1 -1
- package/dist/esm/hooks/core-sdk/useCoreSdk.js +8 -6
- package/dist/esm/hooks/core-sdk/useCoreSdk.js.map +1 -1
- package/dist/esm/hooks/index.d.ts +1 -0
- package/dist/esm/hooks/index.d.ts.map +1 -1
- package/dist/esm/hooks/index.js +1 -0
- package/dist/esm/hooks/index.js.map +1 -1
- package/dist/esm/hooks/useOffers.d.ts +6 -0
- package/dist/esm/hooks/useOffers.d.ts.map +1 -0
- package/dist/esm/hooks/useOffers.js +12 -0
- package/dist/esm/hooks/useOffers.js.map +1 -0
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/components/cta/offer/PreMintButton.tsx +18 -7
- package/src/hooks/core-sdk/useCoreSdk.tsx +12 -7
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useOffers.ts +24 -0
|
@@ -10,9 +10,11 @@ type Props = {
|
|
|
10
10
|
* Amount of vouchers to premint.
|
|
11
11
|
*/
|
|
12
12
|
amount: number;
|
|
13
|
+
metaTxApiId?: string;
|
|
13
14
|
} & CtaButtonProps<{
|
|
14
15
|
offerId: BigNumberish;
|
|
15
16
|
amount: number;
|
|
17
|
+
metaTxApiId?: string;
|
|
16
18
|
}>;
|
|
17
19
|
export declare const PreMintButton: React.FC<Props>;
|
|
18
20
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreMintButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/cta/offer/PreMintButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,YAAY,EAAa,MAAM,QAAQ,CAAC;AAKjD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAQjD,KAAK,KAAK,GAAG;IACX;;OAEG;IACH,OAAO,EAAE,YAAY,CAAC;IACtB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"PreMintButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/cta/offer/PreMintButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,YAAY,EAAa,MAAM,QAAQ,CAAC;AAKjD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAQjD,KAAK,KAAK,GAAG;IACX;;OAEG;IACH,OAAO,EAAE,YAAY,CAAC;IACtB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,cAAc,CAAC;IACjB,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC,CAAC;AAEH,eAAO,MAAM,aAAa,iBAiGzB,CAAC"}
|
|
@@ -63,7 +63,7 @@ const useCoreSdkOverrides_1 = require("../../../hooks/core-sdk/useCoreSdkOverrid
|
|
|
63
63
|
const useMetaTx_1 = require("../../../hooks/useMetaTx");
|
|
64
64
|
const withQueryClientProvider_1 = require("../../queryClient/withQueryClientProvider");
|
|
65
65
|
exports.PreMintButton = (0, withQueryClientProvider_1.withQueryClientProvider)((_a) => {
|
|
66
|
-
var { offerId, amount, disabled = false, showLoading = false, extraInfo, onSuccess, onError, onPendingSignature, onPendingTransaction, waitBlocks = 1, size = buttonSize_1.ButtonSize.Large, variant = "secondaryFill", children, coreSdkConfig } = _a, rest = __rest(_a, ["offerId", "amount", "disabled", "showLoading", "extraInfo", "onSuccess", "onError", "onPendingSignature", "onPendingTransaction", "waitBlocks", "size", "variant", "children", "coreSdkConfig"]);
|
|
66
|
+
var { offerId, amount, disabled = false, showLoading = false, extraInfo, onSuccess, onError, onPendingSignature, onPendingTransaction, waitBlocks = 1, size = buttonSize_1.ButtonSize.Large, variant = "secondaryFill", children, coreSdkConfig, metaTxApiId } = _a, rest = __rest(_a, ["offerId", "amount", "disabled", "showLoading", "extraInfo", "onSuccess", "onError", "onPendingSignature", "onPendingTransaction", "waitBlocks", "size", "variant", "children", "coreSdkConfig", "metaTxApiId"]);
|
|
67
67
|
const coreSdk = (0, useCoreSdkOverrides_1.useCoreSdkOverrides)({ coreSdkConfig });
|
|
68
68
|
const [isLoading, setIsLoading] = (0, react_1.useState)(false);
|
|
69
69
|
const { isMetaTx } = (0, useMetaTx_1.useMetaTx)(coreSdk);
|
|
@@ -82,6 +82,10 @@ exports.PreMintButton = (0, withQueryClientProvider_1.withQueryClientProvider)((
|
|
|
82
82
|
request: request,
|
|
83
83
|
domainSeparator: domainSeparator !== null && domainSeparator !== void 0 ? domainSeparator : "0x305def757d40eaccb764a44e4a9d5ec89af56886451ff9348822884eb7a9674a",
|
|
84
84
|
signature
|
|
85
|
+
}, {
|
|
86
|
+
metaTxConfig: {
|
|
87
|
+
apiId: metaTxApiId
|
|
88
|
+
}
|
|
85
89
|
});
|
|
86
90
|
}
|
|
87
91
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreMintButton.js","sourceRoot":"","sources":["../../../../../src/components/cta/offer/PreMintButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAwC;AAIxC,iDAA8C;AAC9C,6CAAgF;AAEhF,sDAAmD;AACnD,oDAAiD;AACjD,qFAAkF;AAClF,wDAAqD;AACrD,uFAAoF;
|
|
1
|
+
{"version":3,"file":"PreMintButton.js","sourceRoot":"","sources":["../../../../../src/components/cta/offer/PreMintButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAwC;AAIxC,iDAA8C;AAC9C,6CAAgF;AAEhF,sDAAmD;AACnD,oDAAiD;AACjD,qFAAkF;AAClF,wDAAqD;AACrD,uFAAoF;AAmBvE,QAAA,aAAa,GAAG,IAAA,iDAAuB,EAClD,CAAC,EAiBO,EAAE,EAAE;QAjBX,EACC,OAAO,EACP,MAAM,EACN,QAAQ,GAAG,KAAK,EAChB,WAAW,GAAG,KAAK,EACnB,SAAS,EACT,SAAS,EACT,OAAO,EACP,kBAAkB,EAClB,oBAAoB,EACpB,UAAU,GAAG,CAAC,EACd,IAAI,GAAG,uBAAU,CAAC,KAAK,EACvB,OAAO,GAAG,eAAe,EACzB,QAAQ,EACR,aAAa,EAC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,CAAC,CAAC;oBAClD,MAAM,OAAO,GAAG,MAAM,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;oBAElD,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAG,OAAuC,EAAE;wBACnD,OAAO;wBACP,MAAM;qBACP,CAAC,CAAC;gBACL,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAG,KAAc,EAAE;wBACxB,UAAU,EAAE,UAA2C;qBACxD,CAAC,CAAC;gBACL,CAAC;wBAAS,CAAC;oBACT,YAAY,CAAC,KAAK,CAAC,CAAC;gBACtB,CAAC;YACH,CAAC;QACH,CAAC,CAAA,IACG,IAAI;QAER,8BAAC,0BAAiB;YACf,QAAQ,IAAI,kBAAkB;YAC9B,SAAS,IAAI,CAAC,CAAC,CAAC,SAAS,IAAI,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAC5D,8BAAC,kBAAS,QAAE,SAAS,CAAa,CACnC,CAAC,CAAC,CAAC,CACF,8DACG,SAAS,IAAI,WAAW,IAAI,CAC3B,8BAAC,uBAAc;gBACb,8BAAC,iBAAO,OAAG,CACI,CAClB,CACA,CACJ,CACiB,CACb,CACV,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -62,6 +62,8 @@ type CoreSdkOverrides = {
|
|
|
62
62
|
* @param config - Configuration arguments.
|
|
63
63
|
* @returns Instance of `CoreSDK`.
|
|
64
64
|
*/
|
|
65
|
-
export declare function useCoreSdk(config: CoreSdkConfig, overrides?: CoreSdkOverrides
|
|
65
|
+
export declare function useCoreSdk(config: CoreSdkConfig, overrides?: CoreSdkOverrides, options?: {
|
|
66
|
+
enabled?: boolean;
|
|
67
|
+
}): CoreSDK;
|
|
66
68
|
export {};
|
|
67
69
|
//# sourceMappingURL=useCoreSdk.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCoreSdk.d.ts","sourceRoot":"","sources":["../../../../src/hooks/core-sdk/useCoreSdk.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,OAAO,EAEP,QAAQ,EACR,eAAe,EACf,YAAY,EAEb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAiB,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGtE,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,OAAO,EAAE,eAAe,CAAC;IACzB;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;IACnB;;;OAGG;IACH,YAAY,CAAC,EAAE,QAAQ,CAAC;IACxB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC;;OAEG;IACH,0BAA0B,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9D;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,0BAA0B,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9D;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAC/B;;OAEG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B,CAAC;AAEF,KAAK,gBAAgB,GAAG;IAAE,OAAO,CAAC,EAAE,cAAc,CAAA;CAAE,CAAC;AAErD;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,aAAa,EACrB,SAAS,CAAC,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"useCoreSdk.d.ts","sourceRoot":"","sources":["../../../../src/hooks/core-sdk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ethers_1 = require("ethers");
|
|
|
13
13
|
* @param config - Configuration arguments.
|
|
14
14
|
* @returns Instance of `CoreSDK`.
|
|
15
15
|
*/
|
|
16
|
-
function useCoreSdk(config, overrides) {
|
|
17
|
-
const [coreSdk, setCoreSdk] = (0, react_1.useState)(initCoreSdk(config, overrides));
|
|
16
|
+
function useCoreSdk(config, overrides, options = {}) {
|
|
17
|
+
const [coreSdk, setCoreSdk] = (0, react_1.useState)(options.enabled !== false ? initCoreSdk(config, overrides) : undefined);
|
|
18
18
|
(0, react_1.useEffect)(() => {
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
if (options.enabled !== false) {
|
|
20
|
+
const newCoreSdk = initCoreSdk(config, overrides);
|
|
21
|
+
setCoreSdk(newCoreSdk);
|
|
22
|
+
}
|
|
21
23
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
22
|
-
}, [config.web3Provider, config.configId, overrides]);
|
|
23
|
-
return coreSdk;
|
|
24
|
+
}, [config.web3Provider, config.configId, overrides, options.enabled]);
|
|
25
|
+
return coreSdk; // Force cast as CoreSDK since it's enabled by default
|
|
24
26
|
}
|
|
25
27
|
function initCoreSdk(config, overrides) {
|
|
26
28
|
var _a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCoreSdk.js","sourceRoot":"","sources":["../../../../src/hooks/core-sdk/useCoreSdk.tsx"],"names":[],"mappings":";;AA2EA,
|
|
1
|
+
{"version":3,"file":"useCoreSdk.js","sourceRoot":"","sources":["../../../../src/hooks/core-sdk/useCoreSdk.tsx"],"names":[],"mappings":";;AA2EA,gCAoBC;AA/FD,iCAA4C;AAC5C,sDAOiC;AACjC,0DAAoE;AACpE,8DAAkE;AAElE,mCAAmC;AAwDnC;;;;;;GAMG;AACH,SAAgB,UAAU,CACxB,MAAqB,EACrB,SAA4B,EAC5B,UAEI,EAAE;IAEN,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EACpC,OAAO,CAAC,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,CAAC;AAChE,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,2CAA2C,CAAC;AACnD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uCAAuC,CAAC;AACtD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC"}
|
package/dist/cjs/hooks/index.js
CHANGED
|
@@ -59,4 +59,5 @@ __exportStar(require("./useMetaTx"), exports);
|
|
|
59
59
|
__exportStar(require("./useMetaTx"), exports);
|
|
60
60
|
__exportStar(require("./usePrevious"), exports);
|
|
61
61
|
__exportStar(require("./useSignerAddress"), exports);
|
|
62
|
+
__exportStar(require("./useOffers"), exports);
|
|
62
63
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oEAAsE;AAA7D,iHAAA,gBAAgB,OAAA;AACzB,8DAAgE;AAAvD,6GAAA,cAAc,OAAA;AACvB,mEAKmD;AAJjD,yGAAA,gBAAgB,OAAA;AAChB,8GAAA,qBAAqB,OAAA;AACrB,6GAAA,oBAAoB,OAAA;AACpB,+GAAA,sBAAsB,OAAA;AAExB,gFAA8D;AAC9D,+DAA6C;AAC7C,wEAAsD;AACtD,4DAA0C;AAC1C,0DAAwC;AACxC,sEAAoD;AACpD,oEAAkD;AAClD,mEAAiD;AACjD,sEAAoD;AACpD,wEAAsD;AACtD,qEAAmD;AACnD,qEAAmD;AACnD,mEAAiD;AACjD,oDAAmD;AAA1C,wGAAA,UAAU,OAAA;AACnB,iDAA+B;AAC/B,wDAAsC;AACtC,kEAAgD;AAChD,0CAAwB;AACxB,wDAAsC;AACtC,8DAA4C;AAC5C,4DAA0C;AAC1C,+DAA6C;AAC7C,mDAAiC;AACjC,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAC3B,sDAAoC;AACpC,iDAA+B;AAC/B,kDAAgC;AAChC,mEAAkE;AAAzD,gIAAA,sBAAsB,OAAA;AAC/B,8CAA4B;AAC5B,8CAA4B;AAC5B,gDAA8B;AAC9B,qDAAmC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oEAAsE;AAA7D,iHAAA,gBAAgB,OAAA;AACzB,8DAAgE;AAAvD,6GAAA,cAAc,OAAA;AACvB,mEAKmD;AAJjD,yGAAA,gBAAgB,OAAA;AAChB,8GAAA,qBAAqB,OAAA;AACrB,6GAAA,oBAAoB,OAAA;AACpB,+GAAA,sBAAsB,OAAA;AAExB,gFAA8D;AAC9D,+DAA6C;AAC7C,wEAAsD;AACtD,4DAA0C;AAC1C,0DAAwC;AACxC,sEAAoD;AACpD,oEAAkD;AAClD,mEAAiD;AACjD,sEAAoD;AACpD,wEAAsD;AACtD,qEAAmD;AACnD,qEAAmD;AACnD,mEAAiD;AACjD,oDAAmD;AAA1C,wGAAA,UAAU,OAAA;AACnB,iDAA+B;AAC/B,wDAAsC;AACtC,kEAAgD;AAChD,0CAAwB;AACxB,wDAAsC;AACtC,8DAA4C;AAC5C,4DAA0C;AAC1C,+DAA6C;AAC7C,mDAAiC;AACjC,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAC3B,sDAAoC;AACpC,iDAA+B;AAC/B,kDAAgC;AAChC,mEAAkE;AAAzD,gIAAA,sBAAsB,OAAA;AAC/B,8CAA4B;AAC5B,8CAA4B;AAC5B,gDAA8B;AAC9B,qDAAmC;AACnC,8CAA4B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { subgraph } from "@bosonprotocol/core-sdk";
|
|
2
|
+
import { CoreSdkConfig } from "./core-sdk/useCoreSdk";
|
|
3
|
+
export declare function useOffers(config: CoreSdkConfig, props: subgraph.GetOffersQueryQueryVariables, options?: {
|
|
4
|
+
enabled?: boolean;
|
|
5
|
+
}): import("react-query").UseQueryResult<subgraph.OfferFieldsFragment[], unknown>;
|
|
6
|
+
//# sourceMappingURL=useOffers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOffers.d.ts","sourceRoot":"","sources":["../../../src/hooks/useOffers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAEnD,OAAO,EAAE,aAAa,EAAc,MAAM,uBAAuB,CAAC;AAElE,wBAAgB,SAAS,CACvB,MAAM,EAAE,aAAa,EACrB,KAAK,EAAE,QAAQ,CAAC,4BAA4B,EAC5C,OAAO,GAAE;IACP,OAAO,CAAC,EAAE,OAAO,CAAC;CACd,iFAcP"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.useOffers = useOffers;
|
|
13
|
+
const react_query_1 = require("react-query");
|
|
14
|
+
const useCoreSdk_1 = require("./core-sdk/useCoreSdk");
|
|
15
|
+
function useOffers(config, props, options = {}) {
|
|
16
|
+
const coreSDK = (0, useCoreSdk_1.useCoreSdk)(config, undefined, options);
|
|
17
|
+
return (0, react_query_1.useQuery)(["offers", props, coreSDK], () => __awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
const offers = yield (coreSDK === null || coreSDK === void 0 ? void 0 : coreSDK.getOffers(props));
|
|
19
|
+
return offers;
|
|
20
|
+
}), Object.assign({}, options));
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=useOffers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOffers.js","sourceRoot":"","sources":["../../../src/hooks/useOffers.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,8BAmBC;AAtBD,6CAAuC;AACvC,sDAAkE;AAElE,SAAgB,SAAS,CACvB,MAAqB,EACrB,KAA4C,EAC5C,UAEI,EAAE;IAEN,MAAM,OAAO,GAAG,IAAA,uBAAU,EAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IACvD,OAAO,IAAA,sBAAQ,EACb,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,EAC1B,GAAS,EAAE;QACT,MAAM,MAAM,GAAG,MAAM,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,CAAC,KAAK,CAAC,CAAA,CAAC;QAE/C,OAAO,MAAM,CAAC;IAChB,CAAC,CAAA,oBAEI,OAAO,EAEb,CAAC;AACJ,CAAC"}
|
|
@@ -10,9 +10,11 @@ type Props = {
|
|
|
10
10
|
* Amount of vouchers to premint.
|
|
11
11
|
*/
|
|
12
12
|
amount: number;
|
|
13
|
+
metaTxApiId?: string;
|
|
13
14
|
} & CtaButtonProps<{
|
|
14
15
|
offerId: BigNumberish;
|
|
15
16
|
amount: number;
|
|
17
|
+
metaTxApiId?: string;
|
|
16
18
|
}>;
|
|
17
19
|
export declare const PreMintButton: React.FC<Props>;
|
|
18
20
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreMintButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/cta/offer/PreMintButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,YAAY,EAAa,MAAM,QAAQ,CAAC;AAKjD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAQjD,KAAK,KAAK,GAAG;IACX;;OAEG;IACH,OAAO,EAAE,YAAY,CAAC;IACtB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"PreMintButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/cta/offer/PreMintButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,YAAY,EAAa,MAAM,QAAQ,CAAC;AAKjD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAQjD,KAAK,KAAK,GAAG;IACX;;OAEG;IACH,OAAO,EAAE,YAAY,CAAC;IACtB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,cAAc,CAAC;IACjB,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC,CAAC;AAEH,eAAO,MAAM,aAAa,iBAiGzB,CAAC"}
|
|
@@ -6,7 +6,7 @@ import { ButtonSize } from "../../ui/buttonSize";
|
|
|
6
6
|
import { useCoreSdkOverrides } from "../../../hooks/core-sdk/useCoreSdkOverrides";
|
|
7
7
|
import { useMetaTx } from "../../../hooks/useMetaTx";
|
|
8
8
|
import { withQueryClientProvider } from "../../queryClient/withQueryClientProvider";
|
|
9
|
-
export const PreMintButton = withQueryClientProvider(({ offerId, amount, disabled = false, showLoading = false, extraInfo, onSuccess, onError, onPendingSignature, onPendingTransaction, waitBlocks = 1, size = ButtonSize.Large, variant = "secondaryFill", children, coreSdkConfig, ...rest }) => {
|
|
9
|
+
export const PreMintButton = withQueryClientProvider(({ offerId, amount, disabled = false, showLoading = false, extraInfo, onSuccess, onError, onPendingSignature, onPendingTransaction, waitBlocks = 1, size = ButtonSize.Large, variant = "secondaryFill", children, coreSdkConfig, metaTxApiId, ...rest }) => {
|
|
10
10
|
const coreSdk = useCoreSdkOverrides({ coreSdkConfig });
|
|
11
11
|
const [isLoading, setIsLoading] = useState(false);
|
|
12
12
|
const { isMetaTx } = useMetaTx(coreSdk);
|
|
@@ -26,6 +26,10 @@ export const PreMintButton = withQueryClientProvider(({ offerId, amount, disable
|
|
|
26
26
|
domainSeparator: domainSeparator ??
|
|
27
27
|
"0x305def757d40eaccb764a44e4a9d5ec89af56886451ff9348822884eb7a9674a",
|
|
28
28
|
signature
|
|
29
|
+
}, {
|
|
30
|
+
metaTxConfig: {
|
|
31
|
+
apiId: metaTxApiId
|
|
32
|
+
}
|
|
29
33
|
});
|
|
30
34
|
}
|
|
31
35
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreMintButton.js","sourceRoot":"","sources":["../../../../../src/components/cta/offer/PreMintButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAIxC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEhF,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"PreMintButton.js","sourceRoot":"","sources":["../../../../../src/components/cta/offer/PreMintButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAIxC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEhF,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAmBpF,MAAM,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BACF,CACF,CAAC;oBACJ,CAAC;yBAAM,CAAC;wBACN,UAAU,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;oBACtD,CAAC;oBAED,oBAAoB,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;oBAClD,MAAM,OAAO,GAAG,MAAM,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;oBAElD,SAAS,EAAE,CAAC,OAAuC,EAAE;wBACnD,OAAO;wBACP,MAAM;qBACP,CAAC,CAAC;gBACL,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,OAAO,EAAE,CAAC,KAAc,EAAE;wBACxB,UAAU,EAAE,UAA2C;qBACxD,CAAC,CAAC;gBACL,CAAC;wBAAS,CAAC;oBACT,YAAY,CAAC,KAAK,CAAC,CAAC;gBACtB,CAAC;YACH,CAAC;QACH,CAAC,KACG,IAAI;QAER,oBAAC,iBAAiB;YACf,QAAQ,IAAI,kBAAkB;YAC9B,SAAS,IAAI,CAAC,CAAC,CAAC,SAAS,IAAI,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAC5D,oBAAC,SAAS,QAAE,SAAS,CAAa,CACnC,CAAC,CAAC,CAAC,CACF,0CACG,SAAS,IAAI,WAAW,IAAI,CAC3B,oBAAC,cAAc;gBACb,oBAAC,OAAO,OAAG,CACI,CAClB,CACA,CACJ,CACiB,CACb,CACV,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -62,6 +62,8 @@ type CoreSdkOverrides = {
|
|
|
62
62
|
* @param config - Configuration arguments.
|
|
63
63
|
* @returns Instance of `CoreSDK`.
|
|
64
64
|
*/
|
|
65
|
-
export declare function useCoreSdk(config: CoreSdkConfig, overrides?: CoreSdkOverrides
|
|
65
|
+
export declare function useCoreSdk(config: CoreSdkConfig, overrides?: CoreSdkOverrides, options?: {
|
|
66
|
+
enabled?: boolean;
|
|
67
|
+
}): CoreSDK;
|
|
66
68
|
export {};
|
|
67
69
|
//# sourceMappingURL=useCoreSdk.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCoreSdk.d.ts","sourceRoot":"","sources":["../../../../src/hooks/core-sdk/useCoreSdk.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,OAAO,EAEP,QAAQ,EACR,eAAe,EACf,YAAY,EAEb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAiB,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGtE,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,OAAO,EAAE,eAAe,CAAC;IACzB;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;IACnB;;;OAGG;IACH,YAAY,CAAC,EAAE,QAAQ,CAAC;IACxB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC;;OAEG;IACH,0BAA0B,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9D;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,0BAA0B,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9D;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAC/B;;OAEG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B,CAAC;AAEF,KAAK,gBAAgB,GAAG;IAAE,OAAO,CAAC,EAAE,cAAc,CAAA;CAAE,CAAC;AAErD;;;;;;GAMG;AACH,wBA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AAa,EACrB,SAAS,CAAC,EAAE,gBAAgB,EAC5B,OAAO,GAAE;IACP,OAAO,CAAC,EAAE,OAAO,CAAC;CACd,GACL,OAAO,CAcT"}
|
|
@@ -10,14 +10,16 @@ import { providers } from "ethers";
|
|
|
10
10
|
* @param config - Configuration arguments.
|
|
11
11
|
* @returns Instance of `CoreSDK`.
|
|
12
12
|
*/
|
|
13
|
-
export function useCoreSdk(config, overrides) {
|
|
14
|
-
const [coreSdk, setCoreSdk] = useState(initCoreSdk(config, overrides));
|
|
13
|
+
export function useCoreSdk(config, overrides, options = {}) {
|
|
14
|
+
const [coreSdk, setCoreSdk] = useState(options.enabled !== false ? initCoreSdk(config, overrides) : undefined);
|
|
15
15
|
useEffect(() => {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
if (options.enabled !== false) {
|
|
17
|
+
const newCoreSdk = initCoreSdk(config, overrides);
|
|
18
|
+
setCoreSdk(newCoreSdk);
|
|
19
|
+
}
|
|
18
20
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
19
|
-
}, [config.web3Provider, config.configId, overrides]);
|
|
20
|
-
return coreSdk;
|
|
21
|
+
}, [config.web3Provider, config.configId, overrides, options.enabled]);
|
|
22
|
+
return coreSdk; // Force cast as CoreSDK since it's enabled by default
|
|
21
23
|
}
|
|
22
24
|
function initCoreSdk(config, overrides) {
|
|
23
25
|
const defaultConfig = getEnvConfigById(config.envName, config.configId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCoreSdk.js","sourceRoot":"","sources":["../../../../src/hooks/core-sdk/useCoreSdk.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EACL,OAAO,EACP,gBAAgB,EAIhB,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAY,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MA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iC,CAAC;AAChD,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC"}
|
package/dist/esm/hooks/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,2CAA2C,CAAC;AACnD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uCAAuC,CAAC;AACtD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,cAAc,gBAAgB,CAAC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C;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { subgraph } from "@bosonprotocol/core-sdk";
|
|
2
|
+
import { CoreSdkConfig } from "./core-sdk/useCoreSdk";
|
|
3
|
+
export declare function useOffers(config: CoreSdkConfig, props: subgraph.GetOffersQueryQueryVariables, options?: {
|
|
4
|
+
enabled?: boolean;
|
|
5
|
+
}): import("react-query").UseQueryResult<subgraph.OfferFieldsFragment[], unknown>;
|
|
6
|
+
//# sourceMappingURL=useOffers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOffers.d.ts","sourceRoot":"","sources":["../../../src/hooks/useOffers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAEnD,OAAO,EAAE,aAAa,EAAc,MAAM,uBAAuB,CAAC;AAElE,wBAAgB,SAAS,CACvB,MAAM,EAAE,aAAa,EACrB,KAAK,EAAE,QAAQ,CAAC,4BAA4B,EAC5C,OAAO,GAAE;IACP,OAAO,CAAC,EAAE,OAAO,CAAC;CACd,iFAcP"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useQuery } from "react-query";
|
|
2
|
+
import { useCoreSdk } from "./core-sdk/useCoreSdk";
|
|
3
|
+
export function useOffers(config, props, options = {}) {
|
|
4
|
+
const coreSDK = useCoreSdk(config, undefined, options);
|
|
5
|
+
return useQuery(["offers", props, coreSDK], async () => {
|
|
6
|
+
const offers = await coreSDK?.getOffers(props);
|
|
7
|
+
return offers;
|
|
8
|
+
}, {
|
|
9
|
+
...options
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=useOffers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOffers.js","sourceRoot":"","sources":["../../../src/hooks/useOffers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAiB,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAElE,MAAM,UAAU,SAAS,CACvB,MAAqB,EACrB,KAA4C,EAC5C,UAEI,EAAE;IAEN,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IACvD,OAAO,QAAQ,CACb,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,EAC1B,KAAK,IAAI,EAAE;QACT,MAAM,MAAM,GAAG,MAAM,OAAO,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;QAE/C,OAAO,MAAM,CAAC;IAChB,CAAC,EACD;QACE,GAAG,OAAO;KACX,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/borders.ts","../src/colors.ts","../src/index.tsx","../src/react-app-env.d.ts","../src/setupTests.ts","../src/theme.ts","../src/abis/types/EnsPublicResolver.d.ts","../src/abis/types/EnsRegistrar.d.ts","../src/abis/types/Erc1155.d.ts","../src/abis/types/Erc20.d.ts","../src/abis/types/Erc721.d.ts","../src/abis/types/Permit2.d.ts","../src/abis/types/Weth.d.ts","../src/abis/types/commons.ts","../src/abis/types/index.ts","../src/components/avatar/SellerID.tsx","../src/components/avatar/fallback-avatar.tsx","../src/components/boson/BosonProvider.tsx","../src/components/buttons/BaseButton.tsx","../src/components/buttons/BurgerButton.tsx","../src/components/buttons/Button.tsx","../src/components/buttons/commit/CommitButtonView.tsx","../src/components/buttons/commit/CommitView.tsx","../src/components/buttons/commit/ThemedCommitButtonView.tsx","../src/components/buttons/commit/const.ts","../src/components/buttons/commit/types.ts","../src/components/card/card.styles.ts","../src/components/card/card.tsx","../src/components/chat/InitializeChat.tsx","../src/components/chat/InitializeChatWithSuccess.tsx","../src/components/chat/useChatStatus.ts","../src/components/chat/ChatProvider/ChatContext.ts","../src/components/chat/ChatProvider/ChatProvider.tsx","../src/components/chat/ChatProvider/const.ts","../src/components/config/ConfigContext.ts","../src/components/config/ConfigProvider.tsx","../src/components/connection/ConnectionsProvider.tsx","../src/components/connection/WalletConnectV2.ts","../src/components/connection/activate.ts","../src/components/connection/index.ts","../src/components/connection/types.ts","../src/components/connection/utils.ts","../src/components/contractualAgreement/ContractualAgreement.tsx","../src/components/cta/common/CtaButton.tsx","../src/components/cta/common/styles.ts","../src/components/cta/common/types.ts","../src/components/cta/dispute/AddFeesDisputeResolverButton.tsx","../src/components/cta/dispute/AddSellerToDisputeResolverButton.tsx","../src/components/cta/dispute/CreateDisputeResolverButton.tsx","../src/components/cta/dispute/DecideDisputeButton.tsx","../src/components/cta/dispute/EscalateDisputeButton.tsx","../src/components/cta/dispute/ExpireDisputeButton.tsx","../src/components/cta/dispute/ExpireEscalationDisputeButton.tsx","../src/components/cta/dispute/ExtendDisputeTimeoutButton.tsx","../src/components/cta/dispute/RaiseDisputeButton.tsx","../src/components/cta/dispute/RefuseDisputeButton.tsx","../src/components/cta/dispute/RemoveFeesDisputeResolverButton.tsx","../src/components/cta/dispute/RemoveSellerFromDisputeResolverButton.tsx","../src/components/cta/dispute/ResolveDisputeButton.tsx","../src/components/cta/dispute/RetractDisputeButton.tsx","../src/components/cta/dispute/UpdateDisputeResolverButton.tsx","../src/components/cta/exchange/BatchCompleteButton.tsx","../src/components/cta/exchange/CancelButton.tsx","../src/components/cta/exchange/CompleteButton.tsx","../src/components/cta/exchange/ExpireButton.tsx","../src/components/cta/exchange/RedeemButton.tsx","../src/components/cta/exchange/RevokeButton.tsx","../src/components/cta/funds/DepositFundsButton.tsx","../src/components/cta/funds/WithdrawAllFundsButton.tsx","../src/components/cta/funds/WithdrawFundsButton.tsx","../src/components/cta/offer/BatchVoidButton.tsx","../src/components/cta/offer/CommitButton.tsx","../src/components/cta/offer/CreateOfferButton.tsx","../src/components/cta/offer/PreMintButton.tsx","../src/components/cta/offer/ReserveRangeButton.tsx","../src/components/cta/offer/ThemedCommitButton.tsx","../src/components/cta/offer/VoidButton.tsx","../src/components/cta/seller/CreateSellerButton.tsx","../src/components/cta/seller/UpdateSellerButton.tsx","../src/components/currencyDisplay/CurrencyDisplay.tsx","../src/components/datepicker/Calendar.tsx","../src/components/datepicker/DatePicker.style.tsx","../src/components/datepicker/DatePicker.tsx","../src/components/datepicker/SelectMonth.tsx","../src/components/datepicker/SelectTime.tsx","../src/components/datepicker/types.ts","../src/components/datepicker/utils.ts","../src/components/detail/DetailChart.tsx","../src/components/detail/useOfferDataset.ts","../src/components/environment/EnvironmentContext.ts","../src/components/environment/EnvironmentProvider.tsx","../src/components/error/EmptyErrorMessage.tsx","../src/components/error/ErrorMessage.tsx","../src/components/error/SimpleError.tsx","../src/components/exchangeCard/ExchangeCard.styles.ts","../src/components/exchangeCard/ExchangeCard.tsx","../src/components/exchangeCard/const.ts","../src/components/exchangeCard/types.ts","../src/components/form/BaseCheckbox.tsx","../src/components/form/BaseInput.tsx","../src/components/form/BaseSelect.tsx","../src/components/form/BaseTagsInput.tsx","../src/components/form/BaseTextArea.tsx","../src/components/form/Checkbox.tsx","../src/components/form/ClearButton.tsx","../src/components/form/CountrySelect.tsx","../src/components/form/Datepicker.tsx","../src/components/form/Error.tsx","../src/components/form/Field.styles.ts","../src/components/form/FormField.tsx","../src/components/form/Input.tsx","../src/components/form/InputColor.tsx","../src/components/form/Phone.tsx","../src/components/form/Select.tsx","../src/components/form/index.ts","../src/components/form/styles.ts","../src/components/form/types.ts","../src/components/form/Upload/BaseUpload.tsx","../src/components/form/Upload/Upload.tsx","../src/components/form/Upload/UploadedFile.tsx","../src/components/form/Upload/UploadedFiles.tsx","../src/components/form/Upload/UploadedSinglePdfFile.tsx","../src/components/form/Upload/WithUploadToIpfs.tsx","../src/components/form/Upload/ImageEditorModal/ImageEditor.tsx","../src/components/form/Upload/ImageEditorModal/ImageEditorModal.tsx","../src/components/form/styles/BaseTagsInput.styles.ts","../src/components/image/Image.styles.ts","../src/components/image/Image.tsx","../src/components/ipfs/IpfsContext.ts","../src/components/ipfs/IpfsProvider.tsx","../src/components/license/License.tsx","../src/components/logo/AssetLogo.tsx","../src/components/logo/PortfolioLogo.tsx","../src/components/logo/useAssetLogoSource.ts","../src/components/magicLink/Login.tsx","../src/components/magicLink/MagicContext.tsx","../src/components/magicLink/MagicProvider.tsx","../src/components/magicLink/UserContext.tsx","../src/components/magicLink/UserProvider.tsx","../src/components/modal/Modal.tsx","../src/components/modal/ModalComponents.tsx","../src/components/modal/ModalContext.tsx","../src/components/modal/ModalProvider.tsx","../src/components/modal/ModalTypes.ts","../src/components/modal/useModal.ts","../src/components/modal/components/Commit/CommitNonModal.tsx","../src/components/modal/components/Commit/OfferVariantView.tsx","../src/components/modal/components/Commit/useNotCommittableOfferStatus.ts","../src/components/modal/components/Commit/ContractualAgreementView/ContractualAgreementView.tsx","../src/components/modal/components/Commit/DetailView/CommitDetailViewWithProvider.tsx","../src/components/modal/components/Commit/DetailView/CommitRedeemSteps.tsx","../src/components/modal/components/Commit/DetailView/ExternalCommitDetailView.tsx","../src/components/modal/components/Commit/DetailView/InnerCommitDetailView.tsx","../src/components/modal/components/Commit/DetailView/InnerCommitDetailViewWithPortal.tsx","../src/components/modal/components/Commit/DetailView/InnerDetailWithProviderCommit.tsx","../src/components/modal/components/Commit/DetailView/RedeemWhatsNext.tsx","../src/components/modal/components/Commit/DetailView/common/QuantityDisplay.tsx","../src/components/modal/components/Commit/LicenseAgreementView/LicenseAgreementView.tsx","../src/components/modal/components/Commit/OfferFullDescriptionView/OfferFullDescriptionView.tsx","../src/components/modal/components/Commit/OfferPolicyView/CommitOfferPolicyView.tsx","../src/components/modal/components/Redeem/RedeemFormModel.ts","../src/components/modal/components/Redeem/RedeemHeader.tsx","../src/components/modal/components/Redeem/RedeemNonModal.tsx","../src/components/modal/components/Redeem/checkSignatures.tsx","../src/components/modal/components/Redeem/const.ts","../src/components/modal/components/Redeem/Confirmation/Confirmation.tsx","../src/components/modal/components/Redeem/Confirmation/ConfirmationView.tsx","../src/components/modal/components/Redeem/ContractualAgreementView/ContractualAgreementView.tsx","../src/components/modal/components/Redeem/DetailView/ExchangeDetailViewWithProvider.tsx","../src/components/modal/components/Redeem/DetailView/ExternalExchangeDetailView.tsx","../src/components/modal/components/Redeem/DetailView/InnerDetailWithProviderExchange.tsx","../src/components/modal/components/Redeem/DetailView/InnerExchangeDetailView.tsx","../src/components/modal/components/Redeem/ExchangeView/ExchangeView.tsx","../src/components/modal/components/Redeem/ExchangeView/RedeemSuccess.tsx","../src/components/modal/components/Redeem/ExchangeView/ExchangeFullDescriptionView/ExchangeFullDescription.tsx","../src/components/modal/components/Redeem/ExchangeView/ExchangeFullDescriptionView/ExchangeFullDescriptionView.tsx","../src/components/modal/components/Redeem/ExchangeView/cancellation/CancelExchange.tsx","../src/components/modal/components/Redeem/ExchangeView/cancellation/CancellationView.tsx","../src/components/modal/components/Redeem/ExchangeView/expireVoucher/ExpireVoucher.tsx","../src/components/modal/components/Redeem/ExchangeView/expireVoucher/ExpireVoucherView.tsx","../src/components/modal/components/Redeem/LicenseAgreementView/LicenseAgreementView.tsx","../src/components/modal/components/Redeem/MyItems/Exchange.tsx","../src/components/modal/components/Redeem/MyItems/Exchanges.tsx","../src/components/modal/components/Redeem/MyItems/MyItems.tsx","../src/components/modal/components/Redeem/MyItems/ProfilePage.styles.tsx","../src/components/modal/components/Redeem/MyItems/WithExchangesData.tsx","../src/components/modal/components/Redeem/OfferPolicyView/RedeemOfferPolicyView.tsx","../src/components/modal/components/Redeem/RedeemForm/RedeemForm.tsx","../src/components/modal/components/Redeem/RedeemForm/RedeemFormView.tsx","../src/components/modal/components/RequestShipment/RequestShipmentModal.tsx","../src/components/modal/components/RequestShipment/exchangePolicyOverview/ExchangePolicyOverview.tsx","../src/components/modal/components/RequestShipment/exchangePolicyOverview/FairExchangePolicy.tsx","../src/components/modal/components/RequestShipment/exchangePolicyOverview/InfoBox.tsx","../src/components/modal/components/RequestShipment/exchangePolicyOverview/RequestShipmentSuccess.tsx","../src/components/modal/components/SellerFinance/FinanceDeposit.tsx","../src/components/modal/components/SellerFinance/FinanceWithdraw.tsx","../src/components/modal/components/SellerFinance/FinancesStyles.tsx","../src/components/modal/components/Transactions/TransactionFailedModal/TransactionFailedModal.tsx","../src/components/modal/components/Transactions/TransactionSubmittedModal/TransactionSubmittedModal.tsx","../src/components/modal/components/Transactions/WaitingForConfirmationModal/WaitingForConfirmationModal.tsx","../src/components/modal/components/common/BosonLogo.tsx","../src/components/modal/components/common/DetailOpenSea.tsx","../src/components/modal/components/common/ThemedBosonLogo.tsx","../src/components/modal/components/common/VariationSelects.tsx","../src/components/modal/components/common/OfferFullDescription/DigitalProductData.tsx","../src/components/modal/components/common/OfferFullDescription/ExternalOfferFullDescription.tsx","../src/components/modal/components/common/OfferFullDescription/GeneralProductData.tsx","../src/components/modal/components/common/OfferFullDescription/OfferFullDescription.tsx","../src/components/modal/components/common/OfferFullDescription/Overview.tsx","../src/components/modal/components/common/OfferFullDescription/PhysicalProductData.tsx","../src/components/modal/components/common/StepsOverview/StepsOverview.tsx","../src/components/modal/components/common/StepsOverview/style.tsx","../src/components/modal/components/common/detail/BuyOrSwapContainer.tsx","../src/components/modal/components/common/detail/Detail.style.tsx","../src/components/modal/components/common/detail/DetailDisputeResolver.tsx","../src/components/modal/components/common/detail/DetailSlider.tsx","../src/components/modal/components/common/detail/DetailTable.tsx","../src/components/modal/components/common/detail/DetailTransactions.tsx","../src/components/modal/components/common/detail/DetailViewCore.tsx","../src/components/modal/components/common/detail/DetailViewProvider.tsx","../src/components/modal/components/common/detail/DetailViewWithProvider.tsx","../src/components/modal/components/common/detail/InnerDetailViewWithPortal.tsx","../src/components/modal/components/common/detail/PhygitalProduct.tsx","../src/components/modal/components/common/detail/SellerAndDescription.tsx","../src/components/modal/components/common/detail/SlickSlider.tsx","../src/components/modal/components/common/detail/TokenGatedItem.tsx","../src/components/modal/components/common/detail/types.ts","../src/components/modal/components/common/detail/useGetOfferDetailData.tsx","../src/components/modal/nonModal/Header.tsx","../src/components/modal/nonModal/NonModal.tsx","../src/components/modal/nonModal/styles.tsx","../src/components/modal/nonModal/headers/HeaderView.tsx","../src/components/offerPolicy/OfferPolicyDetails.tsx","../src/components/pagination/PaginationPages.tsx","../src/components/portal/Portal.tsx","../src/components/price/ConvertedPrice.tsx","../src/components/price/Price.tsx","../src/components/price/useConvertedPrice.tsx","../src/components/productCard/ProductCard.styles.ts","../src/components/productCard/ProductCard.tsx","../src/components/productCard/commonStyles.ts","../src/components/productCard/const.ts","../src/components/queryClient/QueryClientProviderCustom.tsx","../src/components/queryClient/withQueryClientProvider.tsx","../src/components/scroll/ScrollToID.tsx","../src/components/scroll/ScrollToTop.tsx","../src/components/searchBar/SearchBar.styles.ts","../src/components/searchBar/SearchBar.tsx","../src/components/signer/SignerContext.tsx","../src/components/signer/SignerProvider.tsx","../src/components/signer/useExternalSigner.ts","../src/components/skeleton/CollectionsCardSkeleton.tsx","../src/components/skeleton/ProductCardSkeleton.tsx","../src/components/skeleton/common.ts","../src/components/step/MultiSteps.tsx","../src/components/step/Step.styles.ts","../src/components/step/Step.tsx","../src/components/styles/GlobalStyle.tsx","../src/components/styles/GlobalStyledThemed.tsx","../src/components/styles/ResetStylesForNonWidgets.tsx","../src/components/styles/useCSSVariable.ts","../src/components/toasts/SuccessTransactionToast.tsx","../src/components/toasts/common/ErrorToast.tsx","../src/components/toasts/common/SuccessToast.tsx","../src/components/tooltip/Tooltip.tsx","../src/components/ui/CardCTA.tsx","../src/components/ui/DetailsSummary.tsx","../src/components/ui/Grid.tsx","../src/components/ui/GridContainer.tsx","../src/components/ui/IpfsImage.tsx","../src/components/ui/MuteButton.tsx","../src/components/ui/Step.tsx","../src/components/ui/SvgImage.tsx","../src/components/ui/Tabs.tsx","../src/components/ui/ThemedButton.tsx","../src/components/ui/Typography.tsx","../src/components/ui/Video.tsx","../src/components/ui/buttonSize.ts","../src/components/ui/common.ts","../src/components/ui/getTransientCustomProps.ts","../src/components/ui/styles.ts","../src/components/ui/zIndex.ts","../src/components/ui/column/index.tsx","../src/components/ui/loading/Loading.tsx","../src/components/ui/loading/LoadingWrapper.tsx","../src/components/ui/loading/Spinner.tsx","../src/components/ui/loading/WaveLoader/WaveLoader.tsx","../src/components/wallet2/styles.ts","../src/components/wallet2/accountDrawer/AuthenticatedHeader.tsx","../src/components/wallet2/accountDrawer/DefaultMenu.tsx","../src/components/wallet2/accountDrawer/IconButton.tsx","../src/components/wallet2/accountDrawer/index.tsx","../src/components/wallet2/accountDrawer/fiatOnrampModal/FiatLink.tsx","../src/components/wallet2/accountDrawer/miniPortfolio/ExpandoRow.tsx","../src/components/wallet2/accountDrawer/miniPortfolio/PortfolioRow.tsx","../src/components/wallet2/accountDrawer/miniPortfolio/index.tsx","../src/components/wallet2/accountDrawer/miniPortfolio/tokens/EmptyWalletContent.tsx","../src/components/wallet2/accountDrawer/miniPortfolio/tokens/icons.tsx","../src/components/wallet2/accountDrawer/miniPortfolio/tokens/index.tsx","../src/components/wallet2/identicon/StatusIcon.tsx","../src/components/wallet2/identicon/index.tsx","../src/components/wallet2/navDropdown/NavDropdown.tsx","../src/components/wallet2/selector/ChainSelector.tsx","../src/components/wallet2/selector/ChainSelectorRow.tsx","../src/components/wallet2/selector/getSupportedChainIdsFromWalletConnectSession.ts","../src/components/wallet2/unicon/Container.ts","../src/components/wallet2/unicon/Emblem.ts","../src/components/wallet2/unicon/index.tsx","../src/components/wallet2/unicon/types.ts","../src/components/wallet2/unicon/utils.ts","../src/components/wallet2/walletModal/ConnectionErrorView.tsx","../src/components/wallet2/walletModal/Option.tsx","../src/components/wallet2/walletModal/index.tsx","../src/components/wallet2/web3Provider/InnerWeb3Provider.tsx","../src/components/wallet2/web3Provider/index.tsx","../src/components/wallet2/web3Status/BosonConnectWallet.tsx","../src/components/wallet2/web3Status/index.tsx","../src/components/widgets/BosonThemeProvider.tsx","../src/components/widgets/MarginContainer.tsx","../src/components/widgets/ReduxProvider.tsx","../src/components/widgets/common.ts","../src/components/widgets/index.tsx","../src/components/widgets/types.ts","../src/components/widgets/commit/CommitModalWithOffer.tsx","../src/components/widgets/commit/CommitWidget.tsx","../src/components/widgets/commit/CommitWidgetProviders.tsx","../src/components/widgets/finance/Finance.tsx","../src/components/widgets/finance/FinanceWidget.tsx","../src/components/widgets/finance/FinanceWidgetProviders.tsx","../src/components/widgets/finance/useFunds.ts","../src/components/widgets/finance/useOffersBacked.ts","../src/components/widgets/finance/useSellerDeposit.ts","../src/components/widgets/finance/useSellerRoles.ts","../src/components/widgets/finance/convertion-rate/ConvertionRateContext.tsx","../src/components/widgets/finance/convertion-rate/ConvertionRateProvider.tsx","../src/components/widgets/finance/convertion-rate/useConvertionRate.ts","../src/components/widgets/finance/convertion-rate/useUniswapPools.ts","../src/components/widgets/finance/convertion-rate/utils.ts","../src/components/widgets/finance/exchange-tokens/tokens.ts","../src/components/widgets/finance/exchange-tokens/useExchangeTokens.ts","../src/components/widgets/finance/exchange-tokens/useTokens.ts","../src/components/widgets/redemption/RedeemModalWithExchange.tsx","../src/components/widgets/redemption/RedemptionWidget.tsx","../src/components/widgets/redemption/RedemptionWidgetProviders.tsx","../src/components/widgets/redemption/const.ts","../src/components/widgets/redemption/provider/RedemptionContext.tsx","../src/components/widgets/redemption/provider/RedemptionProvider.tsx","../src/components/widgets/redemption/provider/RedemptionWidgetContext.tsx","../src/components/widgets/redemption/provider/RedemptionWidgetProvider.tsx","../src/components/widgets/roblox/RobloxWidget.tsx","../src/components/widgets/roblox/components/ConnectRoblox.tsx","../src/components/widgets/roblox/components/ConnectWalletWithLogic.tsx","../src/components/widgets/roblox/components/LoginWithRoblox.tsx","../src/components/widgets/roblox/components/ProductsRoblox.tsx","../src/components/widgets/roblox/components/RobloxExchangesGrid.tsx","../src/components/widgets/roblox/components/RobloxProductsGrid.tsx","../src/components/widgets/roblox/components/const.ts","../src/components/widgets/roblox/components/styles.tsx","../src/components/widgets/roblox/components/types.ts","../src/hooks/index.ts","../src/hooks/magic.ts","../src/hooks/useBreakpoints.ts","../src/hooks/useBuyers.ts","../src/hooks/useCheckExchangePolicy.ts","../src/hooks/useCtaClickHandler.ts","../src/hooks/useCurationLists.ts","../src/hooks/useCurrentSellers.ts","../src/hooks/useDebounce.ts","../src/hooks/useDisableScrolling.ts","../src/hooks/useDisputes.ts","../src/hooks/useEffectDebugger.ts","../src/hooks/useExchanges.ts","../src/hooks/useHandleText.ts","../src/hooks/useIpfsMetadataStorage.tsx","../src/hooks/useIpfsStorage.ts","../src/hooks/useLast.ts","../src/hooks/useMetaTx.ts","../src/hooks/useOnClickOutside.ts","../src/hooks/usePrevious.ts","../src/hooks/useRefundData.ts","../src/hooks/useRenderTemplate.ts","../src/hooks/useSellers.ts","../src/hooks/useSignerAddress.tsx","../src/hooks/useTransactionHistory.ts","../src/hooks/useWindowSize.ts","../src/hooks/bundles/useBundleByUuid.ts","../src/hooks/bundles/useBundleItemsImages.ts","../src/hooks/callbacks/types.ts","../src/hooks/callbacks/useRedemptionCallbacks.ts","../src/hooks/connection/connection.ts","../src/hooks/connection/useDisconnect.ts","../src/hooks/connection/useEagerlyConnect.ts","../src/hooks/connection/useSelectChain.tsx","../src/hooks/connection/useSwitchChain.ts","../src/hooks/connection/useSyncChainQuery.ts","../src/hooks/contracts/BlockNumberProvider.tsx","../src/hooks/contracts/getContract.ts","../src/hooks/contracts/multicall.ts","../src/hooks/contracts/useBlockNumber.tsx","../src/hooks/contracts/useContract.ts","../src/hooks/contracts/useGetTokenUriImages.ts","../src/hooks/contracts/useTokenBalances.ts","../src/hooks/contracts/erc1155/useErc1155Name.ts","../src/hooks/contracts/erc1155/useErc1155Uris.ts","../src/hooks/contracts/erc20/useErc20Allowance.ts","../src/hooks/contracts/erc20/useErc20Balance.ts","../src/hooks/contracts/erc20/useErc20ExchangeTokenInfo.ts","../src/hooks/contracts/erc721/useErc721Name.ts","../src/hooks/contracts/erc721/useErc721OwnerOf.ts","../src/hooks/contracts/erc721/useErc721TokenUris.ts","../src/hooks/core-sdk/useCoreSdk.tsx","../src/hooks/core-sdk/useCoreSdkOverrides.ts","../src/hooks/core-sdk/useCoreSdkWithContext.ts","../src/hooks/ens/useENSAddress.ts","../src/hooks/ens/useENSAvatar.ts","../src/hooks/ens/useENSName.ts","../src/hooks/form/useFixSelectFont.tsx","../src/hooks/form/useForm.ts","../src/hooks/images/useFileImage.ts","../src/hooks/images/useIpfsImage.ts","../src/hooks/ipfs/getIpfsHeaders.ts","../src/hooks/ipfs/useIpfsStorage.ts","../src/hooks/ipfs/useSaveImageToIpfs.ts","../src/hooks/lens/useGetLensProfiles.ts","../src/hooks/location/buildUseSearchParams.tsx","../src/hooks/offer/useExchangeTokenBalance.ts","../src/hooks/offer/useIsBosonExclusive.ts","../src/hooks/offer/useIsPhygital.ts","../src/hooks/parameters/useParsedQueryString.ts","../src/hooks/products/useProductByOfferId.ts","../src/hooks/products/useProductByUuid.ts","../src/hooks/roblox/const.ts","../src/hooks/roblox/mutationKeys.ts","../src/hooks/roblox/useGetRobloxWalletAuth.ts","../src/hooks/roblox/useIsRobloxLoggedIn.ts","../src/hooks/roblox/usePostRobloxWalletAuth.ts","../src/hooks/roblox/useRobloxBackendLogin.ts","../src/hooks/roblox/useRobloxExchanges.ts","../src/hooks/roblox/useRobloxGetItemDetails.ts","../src/hooks/roblox/useRobloxLocalStorage.ts","../src/hooks/roblox/useRobloxLogout.ts","../src/hooks/roblox/useRobloxProducts.ts","../src/hooks/roblox/context/RobloxContext.ts","../src/hooks/roblox/context/RobloxProvider.tsx","../src/hooks/roblox/context/useRobloxConfigContext.ts","../src/hooks/storage/useBosonLocalStorage.ts","../src/hooks/storage/useLocalStorage.ts","../src/hooks/tokenGated/useCheckTokenGatedOffer.ts","../src/hooks/tokenGated/BosonSnapshotGate/typechain/BosonSnapshotGate.ts","../src/hooks/tokenGated/BosonSnapshotGate/typechain/common.ts","../src/hooks/tokenGated/BosonSnapshotGate/typechain/index.ts","../src/hooks/tokenGated/BosonSnapshotGate/typechain/factories/BosonSnapshotGate__factory.ts","../src/hooks/tokenGated/BosonSnapshotGate/typechain/factories/index.ts","../src/hooks/transactions/usePendingTransactions.tsx","../src/hooks/transactions/usePendingTransactionsWithContext.tsx","../src/hooks/uniswap/useCurrencyBalance.ts","../src/hooks/uniswap/useFetchListCallback.ts","../src/hooks/uniswap/useInterval.ts","../src/hooks/uniswap/useIsWindowVisible.ts","../src/hooks/uniswap/useSocksBalance.ts","../src/hooks/uniswap/useTokenList/fetchTokenList.ts","../src/hooks/uniswap/useTokenList/filtering.ts","../src/hooks/uniswap/useTokenList/sorting.ts","../src/hooks/web3React/useWeb3ReactWrapper.ts","../src/icons/MagnifyingGlass.tsx","../src/icons/coins/Bitcoin.tsx","../src/icons/coins/Boson.tsx","../src/icons/coins/Dai.tsx","../src/icons/coins/Ether.tsx","../src/icons/coins/Polygon.tsx","../src/icons/coins/Solana.tsx","../src/icons/coins/Tether.tsx","../src/icons/coins/Usdc.tsx","../src/icons/coins/Weth.tsx","../src/icons/coins/index.tsx","../src/lib/address/address.ts","../src/lib/base64/base64.ts","../src/lib/bundle/const.ts","../src/lib/bundle/filter.ts","../src/lib/bytes/bytesToSize.ts","../src/lib/chains/chainIdToNetworkName.ts","../src/lib/chains/getNativeLogoURI.ts","../src/lib/config/config.ts","../src/lib/config/getConfigsByChainId.ts","../src/lib/const/chainInfo.ts","../src/lib/const/chains.ts","../src/lib/const/lists.ts","../src/lib/const/locales.ts","../src/lib/const/misc.ts","../src/lib/const/networks.ts","../src/lib/const/parameters.ts","../src/lib/const/policies.ts","../src/lib/const/providers.ts","../src/lib/const/routing.ts","../src/lib/const/tokenLogoLookup.ts","../src/lib/const/tokenSafetyLookup.ts","../src/lib/const/tokens.ts","../src/lib/const/validationMessage.ts","../src/lib/copy/copyToClipboard.ts","../src/lib/dates/checkIfTimestampIsToo.ts","../src/lib/dates/getDateTimestamp.ts","../src/lib/errors/eth-revert-reason.ts","../src/lib/errors/transactions.ts","../src/lib/images/images.ts","../src/lib/ipfs/ipfs.ts","../src/lib/lens/fetchLens.ts","../src/lib/lens/generated.ts","../src/lib/lens/profile.ts","../src/lib/magicLink/logout.ts","../src/lib/magicLink/provider.ts","../src/lib/numbers/numbers.ts","../src/lib/object/checkIfValueIsEmpty.ts","../src/lib/offer/filter.ts","../src/lib/offer/getIsOfferExpired.ts","../src/lib/offer/getOfferAnimationUrl.ts","../src/lib/offer/getOfferDetails.ts","../src/lib/offer/getOfferLabel.ts","../src/lib/offer/getOfferVariations.ts","../src/lib/opensea/getOpenSeaUrl.ts","../src/lib/parameters/swap.ts","../src/lib/price/convertPrice.ts","../src/lib/price/prices.ts","../src/lib/progress/progressStatus.ts","../src/lib/promises/promises.ts","../src/lib/roblox/config.ts","../src/lib/roblox/constants.ts","../src/lib/roblox/getIsOfferRobloxGated.ts","../src/lib/roblox/types.ts","../src/lib/roblox/utils.ts","../src/lib/signer/externalSigner.ts","../src/lib/signer/useCallSignerFromIframe.ts","../src/lib/state/multicall.tsx","../src/lib/string/formatText.ts","../src/lib/subgraph/subgraph.ts","../src/lib/ui/breakpoint.ts","../src/lib/uniswap/contenthashToUri.ts","../src/lib/uniswap/formatNumbers.ts","../src/lib/uniswap/listSort.ts","../src/lib/uniswap/parseENSAddress.ts","../src/lib/uniswap/resolveENSContentHash.ts","../src/lib/uniswap/safeNamehash.ts","../src/lib/uniswap/validateTokenList.ts","../src/lib/uniswap/__generated__/validateTokenList.js","../src/lib/uniswap/__generated__/validateTokens.js","../src/lib/url/uriToHttp.ts","../src/lib/url/url.ts","../src/lib/userAgent/userAgent.ts","../src/lib/utils/exchange.ts","../src/lib/utils/textFile.ts","../src/lib/videos/videos.ts","../src/state/hooks.ts","../src/state/index.ts","../src/state/migrations.ts","../src/state/reducer.ts","../src/state/reduxContext.ts","../src/state/updaters.tsx","../src/state/global/actions.ts","../src/state/lists/actions.ts","../src/state/lists/hooks.ts","../src/state/lists/reducer.ts","../src/state/lists/updater.ts","../src/state/lists/utils.ts","../src/state/migrations/0.ts","../src/state/migrations/legacy.ts","../src/state/routing/types.ts","../src/state/user/hooks.tsx","../src/state/user/reducer.ts","../src/state/user/types.ts","../src/state/wallets/hooks.tsx","../src/state/wallets/reducer.ts","../src/state/wallets/types.ts","../src/types/bundle.ts","../src/types/exchange.ts","../src/types/externals.d.ts","../src/types/helpers.ts","../src/types/offer.ts","../src/types/tokens.ts","../src/types/transactions.ts","../src/types/tuple.ts","../src/types/variants.ts","../src/types/v3/UniswapInterfaceMulticall.d.ts"],"version":"5.8.3"}
|
|
1
|
+
{"root":["../src/borders.ts","../src/colors.ts","../src/index.tsx","../src/react-app-env.d.ts","../src/setupTests.ts","../src/theme.ts","../src/abis/types/EnsPublicResolver.d.ts","../src/abis/types/EnsRegistrar.d.ts","../src/abis/types/Erc1155.d.ts","../src/abis/types/Erc20.d.ts","../src/abis/types/Erc721.d.ts","../src/abis/types/Permit2.d.ts","../src/abis/types/Weth.d.ts","../src/abis/types/commons.ts","../src/abis/types/index.ts","../src/components/avatar/SellerID.tsx","../src/components/avatar/fallback-avatar.tsx","../src/components/boson/BosonProvider.tsx","../src/components/buttons/BaseButton.tsx","../src/components/buttons/BurgerButton.tsx","../src/components/buttons/Button.tsx","../src/components/buttons/commit/CommitButtonView.tsx","../src/components/buttons/commit/CommitView.tsx","../src/components/buttons/commit/ThemedCommitButtonView.tsx","../src/components/buttons/commit/const.ts","../src/components/buttons/commit/types.ts","../src/components/card/card.styles.ts","../src/components/card/card.tsx","../src/components/chat/InitializeChat.tsx","../src/components/chat/InitializeChatWithSuccess.tsx","../src/components/chat/useChatStatus.ts","../src/components/chat/ChatProvider/ChatContext.ts","../src/components/chat/ChatProvider/ChatProvider.tsx","../src/components/chat/ChatProvider/const.ts","../src/components/config/ConfigContext.ts","../src/components/config/ConfigProvider.tsx","../src/components/connection/ConnectionsProvider.tsx","../src/components/connection/WalletConnectV2.ts","../src/components/connection/activate.ts","../src/components/connection/index.ts","../src/components/connection/types.ts","../src/components/connection/utils.ts","../src/components/contractualAgreement/ContractualAgreement.tsx","../src/components/cta/common/CtaButton.tsx","../src/components/cta/common/styles.ts","../src/components/cta/common/types.ts","../src/components/cta/dispute/AddFeesDisputeResolverButton.tsx","../src/components/cta/dispute/AddSellerToDisputeResolverButton.tsx","../src/components/cta/dispute/CreateDisputeResolverButton.tsx","../src/components/cta/dispute/DecideDisputeButton.tsx","../src/components/cta/dispute/EscalateDisputeButton.tsx","../src/components/cta/dispute/ExpireDisputeButton.tsx","../src/components/cta/dispute/ExpireEscalationDisputeButton.tsx","../src/components/cta/dispute/ExtendDisputeTimeoutButton.tsx","../src/components/cta/dispute/RaiseDisputeButton.tsx","../src/components/cta/dispute/RefuseDisputeButton.tsx","../src/components/cta/dispute/RemoveFeesDisputeResolverButton.tsx","../src/components/cta/dispute/RemoveSellerFromDisputeResolverButton.tsx","../src/components/cta/dispute/ResolveDisputeButton.tsx","../src/components/cta/dispute/RetractDisputeButton.tsx","../src/components/cta/dispute/UpdateDisputeResolverButton.tsx","../src/components/cta/exchange/BatchCompleteButton.tsx","../src/components/cta/exchange/CancelButton.tsx","../src/components/cta/exchange/CompleteButton.tsx","../src/components/cta/exchange/ExpireButton.tsx","../src/components/cta/exchange/RedeemButton.tsx","../src/components/cta/exchange/RevokeButton.tsx","../src/components/cta/funds/DepositFundsButton.tsx","../src/components/cta/funds/WithdrawAllFundsButton.tsx","../src/components/cta/funds/WithdrawFundsButton.tsx","../src/components/cta/offer/BatchVoidButton.tsx","../src/components/cta/offer/CommitButton.tsx","../src/components/cta/offer/CreateOfferButton.tsx","../src/components/cta/offer/PreMintButton.tsx","../src/components/cta/offer/ReserveRangeButton.tsx","../src/components/cta/offer/ThemedCommitButton.tsx","../src/components/cta/offer/VoidButton.tsx","../src/components/cta/seller/CreateSellerButton.tsx","../src/components/cta/seller/UpdateSellerButton.tsx","../src/components/currencyDisplay/CurrencyDisplay.tsx","../src/components/datepicker/Calendar.tsx","../src/components/datepicker/DatePicker.style.tsx","../src/components/datepicker/DatePicker.tsx","../src/components/datepicker/SelectMonth.tsx","../src/components/datepicker/SelectTime.tsx","../src/components/datepicker/types.ts","../src/components/datepicker/utils.ts","../src/components/detail/DetailChart.tsx","../src/components/detail/useOfferDataset.ts","../src/components/environment/EnvironmentContext.ts","../src/components/environment/EnvironmentProvider.tsx","../src/components/error/EmptyErrorMessage.tsx","../src/components/error/ErrorMessage.tsx","../src/components/error/SimpleError.tsx","../src/components/exchangeCard/ExchangeCard.styles.ts","../src/components/exchangeCard/ExchangeCard.tsx","../src/components/exchangeCard/const.ts","../src/components/exchangeCard/types.ts","../src/components/form/BaseCheckbox.tsx","../src/components/form/BaseInput.tsx","../src/components/form/BaseSelect.tsx","../src/components/form/BaseTagsInput.tsx","../src/components/form/BaseTextArea.tsx","../src/components/form/Checkbox.tsx","../src/components/form/ClearButton.tsx","../src/components/form/CountrySelect.tsx","../src/components/form/Datepicker.tsx","../src/components/form/Error.tsx","../src/components/form/Field.styles.ts","../src/components/form/FormField.tsx","../src/components/form/Input.tsx","../src/components/form/InputColor.tsx","../src/components/form/Phone.tsx","../src/components/form/Select.tsx","../src/components/form/index.ts","../src/components/form/styles.ts","../src/components/form/types.ts","../src/components/form/Upload/BaseUpload.tsx","../src/components/form/Upload/Upload.tsx","../src/components/form/Upload/UploadedFile.tsx","../src/components/form/Upload/UploadedFiles.tsx","../src/components/form/Upload/UploadedSinglePdfFile.tsx","../src/components/form/Upload/WithUploadToIpfs.tsx","../src/components/form/Upload/ImageEditorModal/ImageEditor.tsx","../src/components/form/Upload/ImageEditorModal/ImageEditorModal.tsx","../src/components/form/styles/BaseTagsInput.styles.ts","../src/components/image/Image.styles.ts","../src/components/image/Image.tsx","../src/components/ipfs/IpfsContext.ts","../src/components/ipfs/IpfsProvider.tsx","../src/components/license/License.tsx","../src/components/logo/AssetLogo.tsx","../src/components/logo/PortfolioLogo.tsx","../src/components/logo/useAssetLogoSource.ts","../src/components/magicLink/Login.tsx","../src/components/magicLink/MagicContext.tsx","../src/components/magicLink/MagicProvider.tsx","../src/components/magicLink/UserContext.tsx","../src/components/magicLink/UserProvider.tsx","../src/components/modal/Modal.tsx","../src/components/modal/ModalComponents.tsx","../src/components/modal/ModalContext.tsx","../src/components/modal/ModalProvider.tsx","../src/components/modal/ModalTypes.ts","../src/components/modal/useModal.ts","../src/components/modal/components/Commit/CommitNonModal.tsx","../src/components/modal/components/Commit/OfferVariantView.tsx","../src/components/modal/components/Commit/useNotCommittableOfferStatus.ts","../src/components/modal/components/Commit/ContractualAgreementView/ContractualAgreementView.tsx","../src/components/modal/components/Commit/DetailView/CommitDetailViewWithProvider.tsx","../src/components/modal/components/Commit/DetailView/CommitRedeemSteps.tsx","../src/components/modal/components/Commit/DetailView/ExternalCommitDetailView.tsx","../src/components/modal/components/Commit/DetailView/InnerCommitDetailView.tsx","../src/components/modal/components/Commit/DetailView/InnerCommitDetailViewWithPortal.tsx","../src/components/modal/components/Commit/DetailView/InnerDetailWithProviderCommit.tsx","../src/components/modal/components/Commit/DetailView/RedeemWhatsNext.tsx","../src/components/modal/components/Commit/DetailView/common/QuantityDisplay.tsx","../src/components/modal/components/Commit/LicenseAgreementView/LicenseAgreementView.tsx","../src/components/modal/components/Commit/OfferFullDescriptionView/OfferFullDescriptionView.tsx","../src/components/modal/components/Commit/OfferPolicyView/CommitOfferPolicyView.tsx","../src/components/modal/components/Redeem/RedeemFormModel.ts","../src/components/modal/components/Redeem/RedeemHeader.tsx","../src/components/modal/components/Redeem/RedeemNonModal.tsx","../src/components/modal/components/Redeem/checkSignatures.tsx","../src/components/modal/components/Redeem/const.ts","../src/components/modal/components/Redeem/Confirmation/Confirmation.tsx","../src/components/modal/components/Redeem/Confirmation/ConfirmationView.tsx","../src/components/modal/components/Redeem/ContractualAgreementView/ContractualAgreementView.tsx","../src/components/modal/components/Redeem/DetailView/ExchangeDetailViewWithProvider.tsx","../src/components/modal/components/Redeem/DetailView/ExternalExchangeDetailView.tsx","../src/components/modal/components/Redeem/DetailView/InnerDetailWithProviderExchange.tsx","../src/components/modal/components/Redeem/DetailView/InnerExchangeDetailView.tsx","../src/components/modal/components/Redeem/ExchangeView/ExchangeView.tsx","../src/components/modal/components/Redeem/ExchangeView/RedeemSuccess.tsx","../src/components/modal/components/Redeem/ExchangeView/ExchangeFullDescriptionView/ExchangeFullDescription.tsx","../src/components/modal/components/Redeem/ExchangeView/ExchangeFullDescriptionView/ExchangeFullDescriptionView.tsx","../src/components/modal/components/Redeem/ExchangeView/cancellation/CancelExchange.tsx","../src/components/modal/components/Redeem/ExchangeView/cancellation/CancellationView.tsx","../src/components/modal/components/Redeem/ExchangeView/expireVoucher/ExpireVoucher.tsx","../src/components/modal/components/Redeem/ExchangeView/expireVoucher/ExpireVoucherView.tsx","../src/components/modal/components/Redeem/LicenseAgreementView/LicenseAgreementView.tsx","../src/components/modal/components/Redeem/MyItems/Exchange.tsx","../src/components/modal/components/Redeem/MyItems/Exchanges.tsx","../src/components/modal/components/Redeem/MyItems/MyItems.tsx","../src/components/modal/components/Redeem/MyItems/ProfilePage.styles.tsx","../src/components/modal/components/Redeem/MyItems/WithExchangesData.tsx","../src/components/modal/components/Redeem/OfferPolicyView/RedeemOfferPolicyView.tsx","../src/components/modal/components/Redeem/RedeemForm/RedeemForm.tsx","../src/components/modal/components/Redeem/RedeemForm/RedeemFormView.tsx","../src/components/modal/components/RequestShipment/RequestShipmentModal.tsx","../src/components/modal/components/RequestShipment/exchangePolicyOverview/ExchangePolicyOverview.tsx","../src/components/modal/components/RequestShipment/exchangePolicyOverview/FairExchangePolicy.tsx","../src/components/modal/components/RequestShipment/exchangePolicyOverview/InfoBox.tsx","../src/components/modal/components/RequestShipment/exchangePolicyOverview/RequestShipmentSuccess.tsx","../src/components/modal/components/SellerFinance/FinanceDeposit.tsx","../src/components/modal/components/SellerFinance/FinanceWithdraw.tsx","../src/components/modal/components/SellerFinance/FinancesStyles.tsx","../src/components/modal/components/Transactions/TransactionFailedModal/TransactionFailedModal.tsx","../src/components/modal/components/Transactions/TransactionSubmittedModal/TransactionSubmittedModal.tsx","../src/components/modal/components/Transactions/WaitingForConfirmationModal/WaitingForConfirmationModal.tsx","../src/components/modal/components/common/BosonLogo.tsx","../src/components/modal/components/common/DetailOpenSea.tsx","../src/components/modal/components/common/ThemedBosonLogo.tsx","../src/components/modal/components/common/VariationSelects.tsx","../src/components/modal/components/common/OfferFullDescription/DigitalProductData.tsx","../src/components/modal/components/common/OfferFullDescription/ExternalOfferFullDescription.tsx","../src/components/modal/components/common/OfferFullDescription/GeneralProductData.tsx","../src/components/modal/components/common/OfferFullDescription/OfferFullDescription.tsx","../src/components/modal/components/common/OfferFullDescription/Overview.tsx","../src/components/modal/components/common/OfferFullDescription/PhysicalProductData.tsx","../src/components/modal/components/common/StepsOverview/StepsOverview.tsx","../src/components/modal/components/common/StepsOverview/style.tsx","../src/components/modal/components/common/detail/BuyOrSwapContainer.tsx","../src/components/modal/components/common/detail/Detail.style.tsx","../src/components/modal/components/common/detail/DetailDisputeResolver.tsx","../src/components/modal/components/common/detail/DetailSlider.tsx","../src/components/modal/components/common/detail/DetailTable.tsx","../src/components/modal/components/common/detail/DetailTransactions.tsx","../src/components/modal/components/common/detail/DetailViewCore.tsx","../src/components/modal/components/common/detail/DetailViewProvider.tsx","../src/components/modal/components/common/detail/DetailViewWithProvider.tsx","../src/components/modal/components/common/detail/InnerDetailViewWithPortal.tsx","../src/components/modal/components/common/detail/PhygitalProduct.tsx","../src/components/modal/components/common/detail/SellerAndDescription.tsx","../src/components/modal/components/common/detail/SlickSlider.tsx","../src/components/modal/components/common/detail/TokenGatedItem.tsx","../src/components/modal/components/common/detail/types.ts","../src/components/modal/components/common/detail/useGetOfferDetailData.tsx","../src/components/modal/nonModal/Header.tsx","../src/components/modal/nonModal/NonModal.tsx","../src/components/modal/nonModal/styles.tsx","../src/components/modal/nonModal/headers/HeaderView.tsx","../src/components/offerPolicy/OfferPolicyDetails.tsx","../src/components/pagination/PaginationPages.tsx","../src/components/portal/Portal.tsx","../src/components/price/ConvertedPrice.tsx","../src/components/price/Price.tsx","../src/components/price/useConvertedPrice.tsx","../src/components/productCard/ProductCard.styles.ts","../src/components/productCard/ProductCard.tsx","../src/components/productCard/commonStyles.ts","../src/components/productCard/const.ts","../src/components/queryClient/QueryClientProviderCustom.tsx","../src/components/queryClient/withQueryClientProvider.tsx","../src/components/scroll/ScrollToID.tsx","../src/components/scroll/ScrollToTop.tsx","../src/components/searchBar/SearchBar.styles.ts","../src/components/searchBar/SearchBar.tsx","../src/components/signer/SignerContext.tsx","../src/components/signer/SignerProvider.tsx","../src/components/signer/useExternalSigner.ts","../src/components/skeleton/CollectionsCardSkeleton.tsx","../src/components/skeleton/ProductCardSkeleton.tsx","../src/components/skeleton/common.ts","../src/components/step/MultiSteps.tsx","../src/components/step/Step.styles.ts","../src/components/step/Step.tsx","../src/components/styles/GlobalStyle.tsx","../src/components/styles/GlobalStyledThemed.tsx","../src/components/styles/ResetStylesForNonWidgets.tsx","../src/components/styles/useCSSVariable.ts","../src/components/toasts/SuccessTransactionToast.tsx","../src/components/toasts/common/ErrorToast.tsx","../src/components/toasts/common/SuccessToast.tsx","../src/components/tooltip/Tooltip.tsx","../src/components/ui/CardCTA.tsx","../src/components/ui/DetailsSummary.tsx","../src/components/ui/Grid.tsx","../src/components/ui/GridContainer.tsx","../src/components/ui/IpfsImage.tsx","../src/components/ui/MuteButton.tsx","../src/components/ui/Step.tsx","../src/components/ui/SvgImage.tsx","../src/components/ui/Tabs.tsx","../src/components/ui/ThemedButton.tsx","../src/components/ui/Typography.tsx","../src/components/ui/Video.tsx","../src/components/ui/buttonSize.ts","../src/components/ui/common.ts","../src/components/ui/getTransientCustomProps.ts","../src/components/ui/styles.ts","../src/components/ui/zIndex.ts","../src/components/ui/column/index.tsx","../src/components/ui/loading/Loading.tsx","../src/components/ui/loading/LoadingWrapper.tsx","../src/components/ui/loading/Spinner.tsx","../src/components/ui/loading/WaveLoader/WaveLoader.tsx","../src/components/wallet2/styles.ts","../src/components/wallet2/accountDrawer/AuthenticatedHeader.tsx","../src/components/wallet2/accountDrawer/DefaultMenu.tsx","../src/components/wallet2/accountDrawer/IconButton.tsx","../src/components/wallet2/accountDrawer/index.tsx","../src/components/wallet2/accountDrawer/fiatOnrampModal/FiatLink.tsx","../src/components/wallet2/accountDrawer/miniPortfolio/ExpandoRow.tsx","../src/components/wallet2/accountDrawer/miniPortfolio/PortfolioRow.tsx","../src/components/wallet2/accountDrawer/miniPortfolio/index.tsx","../src/components/wallet2/accountDrawer/miniPortfolio/tokens/EmptyWalletContent.tsx","../src/components/wallet2/accountDrawer/miniPortfolio/tokens/icons.tsx","../src/components/wallet2/accountDrawer/miniPortfolio/tokens/index.tsx","../src/components/wallet2/identicon/StatusIcon.tsx","../src/components/wallet2/identicon/index.tsx","../src/components/wallet2/navDropdown/NavDropdown.tsx","../src/components/wallet2/selector/ChainSelector.tsx","../src/components/wallet2/selector/ChainSelectorRow.tsx","../src/components/wallet2/selector/getSupportedChainIdsFromWalletConnectSession.ts","../src/components/wallet2/unicon/Container.ts","../src/components/wallet2/unicon/Emblem.ts","../src/components/wallet2/unicon/index.tsx","../src/components/wallet2/unicon/types.ts","../src/components/wallet2/unicon/utils.ts","../src/components/wallet2/walletModal/ConnectionErrorView.tsx","../src/components/wallet2/walletModal/Option.tsx","../src/components/wallet2/walletModal/index.tsx","../src/components/wallet2/web3Provider/InnerWeb3Provider.tsx","../src/components/wallet2/web3Provider/index.tsx","../src/components/wallet2/web3Status/BosonConnectWallet.tsx","../src/components/wallet2/web3Status/index.tsx","../src/components/widgets/BosonThemeProvider.tsx","../src/components/widgets/MarginContainer.tsx","../src/components/widgets/ReduxProvider.tsx","../src/components/widgets/common.ts","../src/components/widgets/index.tsx","../src/components/widgets/types.ts","../src/components/widgets/commit/CommitModalWithOffer.tsx","../src/components/widgets/commit/CommitWidget.tsx","../src/components/widgets/commit/CommitWidgetProviders.tsx","../src/components/widgets/finance/Finance.tsx","../src/components/widgets/finance/FinanceWidget.tsx","../src/components/widgets/finance/FinanceWidgetProviders.tsx","../src/components/widgets/finance/useFunds.ts","../src/components/widgets/finance/useOffersBacked.ts","../src/components/widgets/finance/useSellerDeposit.ts","../src/components/widgets/finance/useSellerRoles.ts","../src/components/widgets/finance/convertion-rate/ConvertionRateContext.tsx","../src/components/widgets/finance/convertion-rate/ConvertionRateProvider.tsx","../src/components/widgets/finance/convertion-rate/useConvertionRate.ts","../src/components/widgets/finance/convertion-rate/useUniswapPools.ts","../src/components/widgets/finance/convertion-rate/utils.ts","../src/components/widgets/finance/exchange-tokens/tokens.ts","../src/components/widgets/finance/exchange-tokens/useExchangeTokens.ts","../src/components/widgets/finance/exchange-tokens/useTokens.ts","../src/components/widgets/redemption/RedeemModalWithExchange.tsx","../src/components/widgets/redemption/RedemptionWidget.tsx","../src/components/widgets/redemption/RedemptionWidgetProviders.tsx","../src/components/widgets/redemption/const.ts","../src/components/widgets/redemption/provider/RedemptionContext.tsx","../src/components/widgets/redemption/provider/RedemptionProvider.tsx","../src/components/widgets/redemption/provider/RedemptionWidgetContext.tsx","../src/components/widgets/redemption/provider/RedemptionWidgetProvider.tsx","../src/components/widgets/roblox/RobloxWidget.tsx","../src/components/widgets/roblox/components/ConnectRoblox.tsx","../src/components/widgets/roblox/components/ConnectWalletWithLogic.tsx","../src/components/widgets/roblox/components/LoginWithRoblox.tsx","../src/components/widgets/roblox/components/ProductsRoblox.tsx","../src/components/widgets/roblox/components/RobloxExchangesGrid.tsx","../src/components/widgets/roblox/components/RobloxProductsGrid.tsx","../src/components/widgets/roblox/components/const.ts","../src/components/widgets/roblox/components/styles.tsx","../src/components/widgets/roblox/components/types.ts","../src/hooks/index.ts","../src/hooks/magic.ts","../src/hooks/useBreakpoints.ts","../src/hooks/useBuyers.ts","../src/hooks/useCheckExchangePolicy.ts","../src/hooks/useCtaClickHandler.ts","../src/hooks/useCurationLists.ts","../src/hooks/useCurrentSellers.ts","../src/hooks/useDebounce.ts","../src/hooks/useDisableScrolling.ts","../src/hooks/useDisputes.ts","../src/hooks/useEffectDebugger.ts","../src/hooks/useExchanges.ts","../src/hooks/useHandleText.ts","../src/hooks/useIpfsMetadataStorage.tsx","../src/hooks/useIpfsStorage.ts","../src/hooks/useLast.ts","../src/hooks/useMetaTx.ts","../src/hooks/useOffers.ts","../src/hooks/useOnClickOutside.ts","../src/hooks/usePrevious.ts","../src/hooks/useRefundData.ts","../src/hooks/useRenderTemplate.ts","../src/hooks/useSellers.ts","../src/hooks/useSignerAddress.tsx","../src/hooks/useTransactionHistory.ts","../src/hooks/useWindowSize.ts","../src/hooks/bundles/useBundleByUuid.ts","../src/hooks/bundles/useBundleItemsImages.ts","../src/hooks/callbacks/types.ts","../src/hooks/callbacks/useRedemptionCallbacks.ts","../src/hooks/connection/connection.ts","../src/hooks/connection/useDisconnect.ts","../src/hooks/connection/useEagerlyConnect.ts","../src/hooks/connection/useSelectChain.tsx","../src/hooks/connection/useSwitchChain.ts","../src/hooks/connection/useSyncChainQuery.ts","../src/hooks/contracts/BlockNumberProvider.tsx","../src/hooks/contracts/getContract.ts","../src/hooks/contracts/multicall.ts","../src/hooks/contracts/useBlockNumber.tsx","../src/hooks/contracts/useContract.ts","../src/hooks/contracts/useGetTokenUriImages.ts","../src/hooks/contracts/useTokenBalances.ts","../src/hooks/contracts/erc1155/useErc1155Name.ts","../src/hooks/contracts/erc1155/useErc1155Uris.ts","../src/hooks/contracts/erc20/useErc20Allowance.ts","../src/hooks/contracts/erc20/useErc20Balance.ts","../src/hooks/contracts/erc20/useErc20ExchangeTokenInfo.ts","../src/hooks/contracts/erc721/useErc721Name.ts","../src/hooks/contracts/erc721/useErc721OwnerOf.ts","../src/hooks/contracts/erc721/useErc721TokenUris.ts","../src/hooks/core-sdk/useCoreSdk.tsx","../src/hooks/core-sdk/useCoreSdkOverrides.ts","../src/hooks/core-sdk/useCoreSdkWithContext.ts","../src/hooks/ens/useENSAddress.ts","../src/hooks/ens/useENSAvatar.ts","../src/hooks/ens/useENSName.ts","../src/hooks/form/useFixSelectFont.tsx","../src/hooks/form/useForm.ts","../src/hooks/images/useFileImage.ts","../src/hooks/images/useIpfsImage.ts","../src/hooks/ipfs/getIpfsHeaders.ts","../src/hooks/ipfs/useIpfsStorage.ts","../src/hooks/ipfs/useSaveImageToIpfs.ts","../src/hooks/lens/useGetLensProfiles.ts","../src/hooks/location/buildUseSearchParams.tsx","../src/hooks/offer/useExchangeTokenBalance.ts","../src/hooks/offer/useIsBosonExclusive.ts","../src/hooks/offer/useIsPhygital.ts","../src/hooks/parameters/useParsedQueryString.ts","../src/hooks/products/useProductByOfferId.ts","../src/hooks/products/useProductByUuid.ts","../src/hooks/roblox/const.ts","../src/hooks/roblox/mutationKeys.ts","../src/hooks/roblox/useGetRobloxWalletAuth.ts","../src/hooks/roblox/useIsRobloxLoggedIn.ts","../src/hooks/roblox/usePostRobloxWalletAuth.ts","../src/hooks/roblox/useRobloxBackendLogin.ts","../src/hooks/roblox/useRobloxExchanges.ts","../src/hooks/roblox/useRobloxGetItemDetails.ts","../src/hooks/roblox/useRobloxLocalStorage.ts","../src/hooks/roblox/useRobloxLogout.ts","../src/hooks/roblox/useRobloxProducts.ts","../src/hooks/roblox/context/RobloxContext.ts","../src/hooks/roblox/context/RobloxProvider.tsx","../src/hooks/roblox/context/useRobloxConfigContext.ts","../src/hooks/storage/useBosonLocalStorage.ts","../src/hooks/storage/useLocalStorage.ts","../src/hooks/tokenGated/useCheckTokenGatedOffer.ts","../src/hooks/tokenGated/BosonSnapshotGate/typechain/BosonSnapshotGate.ts","../src/hooks/tokenGated/BosonSnapshotGate/typechain/common.ts","../src/hooks/tokenGated/BosonSnapshotGate/typechain/index.ts","../src/hooks/tokenGated/BosonSnapshotGate/typechain/factories/BosonSnapshotGate__factory.ts","../src/hooks/tokenGated/BosonSnapshotGate/typechain/factories/index.ts","../src/hooks/transactions/usePendingTransactions.tsx","../src/hooks/transactions/usePendingTransactionsWithContext.tsx","../src/hooks/uniswap/useCurrencyBalance.ts","../src/hooks/uniswap/useFetchListCallback.ts","../src/hooks/uniswap/useInterval.ts","../src/hooks/uniswap/useIsWindowVisible.ts","../src/hooks/uniswap/useSocksBalance.ts","../src/hooks/uniswap/useTokenList/fetchTokenList.ts","../src/hooks/uniswap/useTokenList/filtering.ts","../src/hooks/uniswap/useTokenList/sorting.ts","../src/hooks/web3React/useWeb3ReactWrapper.ts","../src/icons/MagnifyingGlass.tsx","../src/icons/coins/Bitcoin.tsx","../src/icons/coins/Boson.tsx","../src/icons/coins/Dai.tsx","../src/icons/coins/Ether.tsx","../src/icons/coins/Polygon.tsx","../src/icons/coins/Solana.tsx","../src/icons/coins/Tether.tsx","../src/icons/coins/Usdc.tsx","../src/icons/coins/Weth.tsx","../src/icons/coins/index.tsx","../src/lib/address/address.ts","../src/lib/base64/base64.ts","../src/lib/bundle/const.ts","../src/lib/bundle/filter.ts","../src/lib/bytes/bytesToSize.ts","../src/lib/chains/chainIdToNetworkName.ts","../src/lib/chains/getNativeLogoURI.ts","../src/lib/config/config.ts","../src/lib/config/getConfigsByChainId.ts","../src/lib/const/chainInfo.ts","../src/lib/const/chains.ts","../src/lib/const/lists.ts","../src/lib/const/locales.ts","../src/lib/const/misc.ts","../src/lib/const/networks.ts","../src/lib/const/parameters.ts","../src/lib/const/policies.ts","../src/lib/const/providers.ts","../src/lib/const/routing.ts","../src/lib/const/tokenLogoLookup.ts","../src/lib/const/tokenSafetyLookup.ts","../src/lib/const/tokens.ts","../src/lib/const/validationMessage.ts","../src/lib/copy/copyToClipboard.ts","../src/lib/dates/checkIfTimestampIsToo.ts","../src/lib/dates/getDateTimestamp.ts","../src/lib/errors/eth-revert-reason.ts","../src/lib/errors/transactions.ts","../src/lib/images/images.ts","../src/lib/ipfs/ipfs.ts","../src/lib/lens/fetchLens.ts","../src/lib/lens/generated.ts","../src/lib/lens/profile.ts","../src/lib/magicLink/logout.ts","../src/lib/magicLink/provider.ts","../src/lib/numbers/numbers.ts","../src/lib/object/checkIfValueIsEmpty.ts","../src/lib/offer/filter.ts","../src/lib/offer/getIsOfferExpired.ts","../src/lib/offer/getOfferAnimationUrl.ts","../src/lib/offer/getOfferDetails.ts","../src/lib/offer/getOfferLabel.ts","../src/lib/offer/getOfferVariations.ts","../src/lib/opensea/getOpenSeaUrl.ts","../src/lib/parameters/swap.ts","../src/lib/price/convertPrice.ts","../src/lib/price/prices.ts","../src/lib/progress/progressStatus.ts","../src/lib/promises/promises.ts","../src/lib/roblox/config.ts","../src/lib/roblox/constants.ts","../src/lib/roblox/getIsOfferRobloxGated.ts","../src/lib/roblox/types.ts","../src/lib/roblox/utils.ts","../src/lib/signer/externalSigner.ts","../src/lib/signer/useCallSignerFromIframe.ts","../src/lib/state/multicall.tsx","../src/lib/string/formatText.ts","../src/lib/subgraph/subgraph.ts","../src/lib/ui/breakpoint.ts","../src/lib/uniswap/contenthashToUri.ts","../src/lib/uniswap/formatNumbers.ts","../src/lib/uniswap/listSort.ts","../src/lib/uniswap/parseENSAddress.ts","../src/lib/uniswap/resolveENSContentHash.ts","../src/lib/uniswap/safeNamehash.ts","../src/lib/uniswap/validateTokenList.ts","../src/lib/uniswap/__generated__/validateTokenList.js","../src/lib/uniswap/__generated__/validateTokens.js","../src/lib/url/uriToHttp.ts","../src/lib/url/url.ts","../src/lib/userAgent/userAgent.ts","../src/lib/utils/exchange.ts","../src/lib/utils/textFile.ts","../src/lib/videos/videos.ts","../src/state/hooks.ts","../src/state/index.ts","../src/state/migrations.ts","../src/state/reducer.ts","../src/state/reduxContext.ts","../src/state/updaters.tsx","../src/state/global/actions.ts","../src/state/lists/actions.ts","../src/state/lists/hooks.ts","../src/state/lists/reducer.ts","../src/state/lists/updater.ts","../src/state/lists/utils.ts","../src/state/migrations/0.ts","../src/state/migrations/legacy.ts","../src/state/routing/types.ts","../src/state/user/hooks.tsx","../src/state/user/reducer.ts","../src/state/user/types.ts","../src/state/wallets/hooks.tsx","../src/state/wallets/reducer.ts","../src/state/wallets/types.ts","../src/types/bundle.ts","../src/types/exchange.ts","../src/types/externals.d.ts","../src/types/helpers.ts","../src/types/offer.ts","../src/types/tokens.ts","../src/types/transactions.ts","../src/types/tuple.ts","../src/types/variants.ts","../src/types/v3/UniswapInterfaceMulticall.d.ts"],"version":"5.8.3"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bosonprotocol/react-kit",
|
|
3
3
|
"description": "React toolkit with smart components and hooks for building on top of the Boson Protocol.",
|
|
4
|
-
"version": "0.42.0-alpha.
|
|
4
|
+
"version": "0.42.0-alpha.2",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
7
7
|
"types": "./dist/cjs/index.d.ts",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"license": "Apache-2.0",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@bosonprotocol/chat-sdk": "^1.3.1-alpha.20",
|
|
18
|
-
"@bosonprotocol/core-sdk": "^1.46.0-alpha.
|
|
19
|
-
"@bosonprotocol/ethers-sdk": "^1.17.1-alpha.
|
|
18
|
+
"@bosonprotocol/core-sdk": "^1.46.0-alpha.2",
|
|
19
|
+
"@bosonprotocol/ethers-sdk": "^1.17.1-alpha.1",
|
|
20
20
|
"@bosonprotocol/ipfs-storage": "^1.13.0",
|
|
21
21
|
"@davatar/react": "1.11.1",
|
|
22
22
|
"@ethersproject/units": "5.6.0",
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
}
|
|
153
153
|
},
|
|
154
154
|
"devDependencies": {
|
|
155
|
-
"@bosonprotocol/common": "^1.32.1-alpha.
|
|
155
|
+
"@bosonprotocol/common": "^1.32.1-alpha.1",
|
|
156
156
|
"@chromatic-com/storybook": "^1.2.18",
|
|
157
157
|
"@storybook/addon-essentials": "^8.0.0",
|
|
158
158
|
"@storybook/addon-interactions": "^8.0.0",
|
|
@@ -206,5 +206,5 @@
|
|
|
206
206
|
"overrides": {
|
|
207
207
|
"typescript": "^5.1.6"
|
|
208
208
|
},
|
|
209
|
-
"gitHead": "
|
|
209
|
+
"gitHead": "3cbeb6e246f67c7499979c2f4b357f0a23b64356"
|
|
210
210
|
}
|
|
@@ -21,9 +21,11 @@ type Props = {
|
|
|
21
21
|
* Amount of vouchers to premint.
|
|
22
22
|
*/
|
|
23
23
|
amount: number;
|
|
24
|
+
metaTxApiId?: string;
|
|
24
25
|
} & CtaButtonProps<{
|
|
25
26
|
offerId: BigNumberish;
|
|
26
27
|
amount: number;
|
|
28
|
+
metaTxApiId?: string;
|
|
27
29
|
}>;
|
|
28
30
|
|
|
29
31
|
export const PreMintButton = withQueryClientProvider(
|
|
@@ -42,6 +44,7 @@ export const PreMintButton = withQueryClientProvider(
|
|
|
42
44
|
variant = "secondaryFill",
|
|
43
45
|
children,
|
|
44
46
|
coreSdkConfig,
|
|
47
|
+
metaTxApiId,
|
|
45
48
|
...rest
|
|
46
49
|
}: Props) => {
|
|
47
50
|
const coreSdk = useCoreSdkOverrides({ coreSdkConfig });
|
|
@@ -68,13 +71,21 @@ export const PreMintButton = withQueryClientProvider(
|
|
|
68
71
|
amount
|
|
69
72
|
});
|
|
70
73
|
|
|
71
|
-
txResponse = await coreSdk.relayBiconomyMetaTransaction(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
txResponse = await coreSdk.relayBiconomyMetaTransaction(
|
|
75
|
+
to,
|
|
76
|
+
{
|
|
77
|
+
request: request as forwarder.biconomy.ERC20ForwardRequest,
|
|
78
|
+
domainSeparator:
|
|
79
|
+
domainSeparator ??
|
|
80
|
+
"0x305def757d40eaccb764a44e4a9d5ec89af56886451ff9348822884eb7a9674a",
|
|
81
|
+
signature
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
metaTxConfig: {
|
|
85
|
+
apiId: metaTxApiId
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
);
|
|
78
89
|
} else {
|
|
79
90
|
txResponse = await coreSdk.preMint(offerId, amount);
|
|
80
91
|
}
|
|
@@ -75,19 +75,24 @@ type CoreSdkOverrides = { web3Lib?: Web3LibAdapter };
|
|
|
75
75
|
*/
|
|
76
76
|
export function useCoreSdk(
|
|
77
77
|
config: CoreSdkConfig,
|
|
78
|
-
overrides?: CoreSdkOverrides
|
|
78
|
+
overrides?: CoreSdkOverrides,
|
|
79
|
+
options: {
|
|
80
|
+
enabled?: boolean;
|
|
81
|
+
} = {}
|
|
79
82
|
): CoreSDK {
|
|
80
|
-
const [coreSdk, setCoreSdk] = useState<CoreSDK>(
|
|
81
|
-
initCoreSdk(config, overrides)
|
|
83
|
+
const [coreSdk, setCoreSdk] = useState<CoreSDK | undefined>(
|
|
84
|
+
options.enabled !== false ? initCoreSdk(config, overrides) : undefined
|
|
82
85
|
);
|
|
83
86
|
|
|
84
87
|
useEffect(() => {
|
|
85
|
-
|
|
86
|
-
|
|
88
|
+
if (options.enabled !== false) {
|
|
89
|
+
const newCoreSdk = initCoreSdk(config, overrides);
|
|
90
|
+
setCoreSdk(newCoreSdk);
|
|
91
|
+
}
|
|
87
92
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
88
|
-
}, [config.web3Provider, config.configId, overrides]);
|
|
93
|
+
}, [config.web3Provider, config.configId, overrides, options.enabled]);
|
|
89
94
|
|
|
90
|
-
return coreSdk;
|
|
95
|
+
return coreSdk as CoreSDK; // Force cast as CoreSDK since it's enabled by default
|
|
91
96
|
}
|
|
92
97
|
|
|
93
98
|
function initCoreSdk(config: CoreSdkConfig, overrides?: CoreSdkOverrides) {
|
package/src/hooks/index.ts
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { subgraph } from "@bosonprotocol/core-sdk";
|
|
2
|
+
import { useQuery } from "react-query";
|
|
3
|
+
import { CoreSdkConfig, useCoreSdk } from "./core-sdk/useCoreSdk";
|
|
4
|
+
|
|
5
|
+
export function useOffers(
|
|
6
|
+
config: CoreSdkConfig,
|
|
7
|
+
props: subgraph.GetOffersQueryQueryVariables,
|
|
8
|
+
options: {
|
|
9
|
+
enabled?: boolean;
|
|
10
|
+
} = {}
|
|
11
|
+
) {
|
|
12
|
+
const coreSDK = useCoreSdk(config, undefined, options);
|
|
13
|
+
return useQuery(
|
|
14
|
+
["offers", props, coreSDK],
|
|
15
|
+
async () => {
|
|
16
|
+
const offers = await coreSDK?.getOffers(props);
|
|
17
|
+
|
|
18
|
+
return offers;
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
...options
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
}
|