@b3dotfun/sdk 0.0.1-alpha.5 → 0.0.1-alpha.6
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/anyspend/index.native.d.ts +13 -0
- package/dist/cjs/anyspend/index.native.js +35 -0
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.js +3 -1
- package/dist/cjs/global-account/react/index.native.d.ts +3 -0
- package/dist/cjs/global-account/react/index.native.js +19 -0
- package/dist/esm/anyspend/index.native.d.ts +13 -0
- package/dist/esm/anyspend/index.native.js +19 -0
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.js +3 -1
- package/dist/esm/global-account/react/index.native.d.ts +3 -0
- package/dist/esm/global-account/react/index.native.js +3 -0
- package/dist/types/anyspend/index.native.d.ts +13 -0
- package/dist/types/global-account/react/index.native.d.ts +3 -0
- package/package.json +1 -1
- package/src/anyspend/index.native.ts +24 -0
- package/src/anyspend/react/components/AnySpendBuySpin.tsx +5 -1
- package/src/global-account/react/index.native.ts +3 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from "./react/hooks";
|
|
2
|
+
export * from "./react/providers/AnyspendProvider";
|
|
3
|
+
export * from "./types";
|
|
4
|
+
export * from "./utils/address";
|
|
5
|
+
export * from "./utils/chain";
|
|
6
|
+
export * from "./utils/format";
|
|
7
|
+
export * from "./utils/json";
|
|
8
|
+
export * from "./utils/number";
|
|
9
|
+
export * from "./utils/string";
|
|
10
|
+
export * from "./utils/token";
|
|
11
|
+
export * from "./constants";
|
|
12
|
+
export * from "./abis/abi-usdc-base";
|
|
13
|
+
export * from "./abis/erc20-staking";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
// Export all hooks
|
|
18
|
+
__exportStar(require("./react/hooks"), exports);
|
|
19
|
+
// Providers
|
|
20
|
+
__exportStar(require("./react/providers/AnyspendProvider"), exports);
|
|
21
|
+
// Types
|
|
22
|
+
__exportStar(require("./types"), exports);
|
|
23
|
+
// Utils
|
|
24
|
+
__exportStar(require("./utils/address"), exports);
|
|
25
|
+
__exportStar(require("./utils/chain"), exports);
|
|
26
|
+
__exportStar(require("./utils/format"), exports);
|
|
27
|
+
__exportStar(require("./utils/json"), exports);
|
|
28
|
+
__exportStar(require("./utils/number"), exports);
|
|
29
|
+
__exportStar(require("./utils/string"), exports);
|
|
30
|
+
__exportStar(require("./utils/token"), exports);
|
|
31
|
+
// Constants
|
|
32
|
+
__exportStar(require("./constants"), exports);
|
|
33
|
+
// Abis
|
|
34
|
+
__exportStar(require("./abis/abi-usdc-base"), exports);
|
|
35
|
+
__exportStar(require("./abis/erc20-staking"), exports);
|
|
@@ -184,7 +184,9 @@ function AnySpendBuySpin({ isMainnet = true, loadOrder, mode = "modal", spinwhee
|
|
|
184
184
|
return;
|
|
185
185
|
}
|
|
186
186
|
// Check maximum entries per user (0 means no limit)
|
|
187
|
-
if (paymentConfig &&
|
|
187
|
+
if (paymentConfig &&
|
|
188
|
+
paymentConfig.maxEntriesPerUser > BigInt(0) &&
|
|
189
|
+
BigInt(numValue) > paymentConfig.maxEntriesPerUser) {
|
|
188
190
|
setIsQuantityValid(false);
|
|
189
191
|
setUserSpinQuantity("");
|
|
190
192
|
setValidationError(`Maximum ${paymentConfig.maxEntriesPerUser.toString()} spins allowed`);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./components"), exports);
|
|
18
|
+
__exportStar(require("./hooks"), exports);
|
|
19
|
+
__exportStar(require("./stores"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from "./react/hooks";
|
|
2
|
+
export * from "./react/providers/AnyspendProvider";
|
|
3
|
+
export * from "./types";
|
|
4
|
+
export * from "./utils/address";
|
|
5
|
+
export * from "./utils/chain";
|
|
6
|
+
export * from "./utils/format";
|
|
7
|
+
export * from "./utils/json";
|
|
8
|
+
export * from "./utils/number";
|
|
9
|
+
export * from "./utils/string";
|
|
10
|
+
export * from "./utils/token";
|
|
11
|
+
export * from "./constants";
|
|
12
|
+
export * from "./abis/abi-usdc-base";
|
|
13
|
+
export * from "./abis/erc20-staking";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Export all hooks
|
|
2
|
+
export * from "./react/hooks";
|
|
3
|
+
// Providers
|
|
4
|
+
export * from "./react/providers/AnyspendProvider";
|
|
5
|
+
// Types
|
|
6
|
+
export * from "./types";
|
|
7
|
+
// Utils
|
|
8
|
+
export * from "./utils/address";
|
|
9
|
+
export * from "./utils/chain";
|
|
10
|
+
export * from "./utils/format";
|
|
11
|
+
export * from "./utils/json";
|
|
12
|
+
export * from "./utils/number";
|
|
13
|
+
export * from "./utils/string";
|
|
14
|
+
export * from "./utils/token";
|
|
15
|
+
// Constants
|
|
16
|
+
export * from "./constants";
|
|
17
|
+
// Abis
|
|
18
|
+
export * from "./abis/abi-usdc-base";
|
|
19
|
+
export * from "./abis/erc20-staking";
|
|
@@ -178,7 +178,9 @@ export function AnySpendBuySpin({ isMainnet = true, loadOrder, mode = "modal", s
|
|
|
178
178
|
return;
|
|
179
179
|
}
|
|
180
180
|
// Check maximum entries per user (0 means no limit)
|
|
181
|
-
if (paymentConfig &&
|
|
181
|
+
if (paymentConfig &&
|
|
182
|
+
paymentConfig.maxEntriesPerUser > BigInt(0) &&
|
|
183
|
+
BigInt(numValue) > paymentConfig.maxEntriesPerUser) {
|
|
182
184
|
setIsQuantityValid(false);
|
|
183
185
|
setUserSpinQuantity("");
|
|
184
186
|
setValidationError(`Maximum ${paymentConfig.maxEntriesPerUser.toString()} spins allowed`);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from "./react/hooks";
|
|
2
|
+
export * from "./react/providers/AnyspendProvider";
|
|
3
|
+
export * from "./types";
|
|
4
|
+
export * from "./utils/address";
|
|
5
|
+
export * from "./utils/chain";
|
|
6
|
+
export * from "./utils/format";
|
|
7
|
+
export * from "./utils/json";
|
|
8
|
+
export * from "./utils/number";
|
|
9
|
+
export * from "./utils/string";
|
|
10
|
+
export * from "./utils/token";
|
|
11
|
+
export * from "./constants";
|
|
12
|
+
export * from "./abis/abi-usdc-base";
|
|
13
|
+
export * from "./abis/erc20-staking";
|
package/package.json
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Export all hooks
|
|
2
|
+
export * from "./react/hooks";
|
|
3
|
+
|
|
4
|
+
// Providers
|
|
5
|
+
export * from "./react/providers/AnyspendProvider";
|
|
6
|
+
|
|
7
|
+
// Types
|
|
8
|
+
export * from "./types";
|
|
9
|
+
|
|
10
|
+
// Utils
|
|
11
|
+
export * from "./utils/address";
|
|
12
|
+
export * from "./utils/chain";
|
|
13
|
+
export * from "./utils/format";
|
|
14
|
+
export * from "./utils/json";
|
|
15
|
+
export * from "./utils/number";
|
|
16
|
+
export * from "./utils/string";
|
|
17
|
+
export * from "./utils/token";
|
|
18
|
+
|
|
19
|
+
// Constants
|
|
20
|
+
export * from "./constants";
|
|
21
|
+
|
|
22
|
+
// Abis
|
|
23
|
+
export * from "./abis/abi-usdc-base";
|
|
24
|
+
export * from "./abis/erc20-staking";
|
|
@@ -238,7 +238,11 @@ export function AnySpendBuySpin({
|
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
// Check maximum entries per user (0 means no limit)
|
|
241
|
-
if (
|
|
241
|
+
if (
|
|
242
|
+
paymentConfig &&
|
|
243
|
+
paymentConfig.maxEntriesPerUser > BigInt(0) &&
|
|
244
|
+
BigInt(numValue) > paymentConfig.maxEntriesPerUser
|
|
245
|
+
) {
|
|
242
246
|
setIsQuantityValid(false);
|
|
243
247
|
setUserSpinQuantity("");
|
|
244
248
|
setValidationError(`Maximum ${paymentConfig.maxEntriesPerUser.toString()} spins allowed`);
|