@goodaofi/bonds-sdk 3.0.160 → 3.0.162
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/main.js
CHANGED
|
@@ -26654,7 +26654,7 @@ bn$1.exports;
|
|
|
26654
26654
|
var bnExports = bn$1.exports;
|
|
26655
26655
|
var BN$1 = /*@__PURE__*/getDefaultExportFromCjs(bnExports);
|
|
26656
26656
|
|
|
26657
|
-
const version$j = "logger/5.
|
|
26657
|
+
const version$j = "logger/5.7.0";
|
|
26658
26658
|
|
|
26659
26659
|
let _permanentCensorErrors = false;
|
|
26660
26660
|
let _censorErrors = false;
|
|
@@ -27005,7 +27005,7 @@ class Logger {
|
|
|
27005
27005
|
Logger.errors = ErrorCode;
|
|
27006
27006
|
Logger.levels = LogLevel;
|
|
27007
27007
|
|
|
27008
|
-
const version$i = "bytes/5.
|
|
27008
|
+
const version$i = "bytes/5.7.0";
|
|
27009
27009
|
|
|
27010
27010
|
const logger$o = new Logger(version$i);
|
|
27011
27011
|
///////////////////////////////
|
|
@@ -27405,7 +27405,7 @@ function splitSignature(signature) {
|
|
|
27405
27405
|
return result;
|
|
27406
27406
|
}
|
|
27407
27407
|
|
|
27408
|
-
const version$h = "bignumber/5.
|
|
27408
|
+
const version$h = "bignumber/5.7.0";
|
|
27409
27409
|
|
|
27410
27410
|
var BN = BN$1.BN;
|
|
27411
27411
|
const logger$n = new Logger(version$h);
|
|
@@ -28050,7 +28050,7 @@ class FixedNumber {
|
|
|
28050
28050
|
const ONE = FixedNumber.from(1);
|
|
28051
28051
|
const BUMP = FixedNumber.from("0.5");
|
|
28052
28052
|
|
|
28053
|
-
const version$g = "properties/5.
|
|
28053
|
+
const version$g = "properties/5.7.0";
|
|
28054
28054
|
|
|
28055
28055
|
var __awaiter$8 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
28056
28056
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -28175,7 +28175,7 @@ class Description {
|
|
|
28175
28175
|
}
|
|
28176
28176
|
}
|
|
28177
28177
|
|
|
28178
|
-
const version$f = "abi/5.
|
|
28178
|
+
const version$f = "abi/5.7.0";
|
|
28179
28179
|
|
|
28180
28180
|
const logger$k = new Logger(version$f);
|
|
28181
28181
|
const _constructorGuard$1 = {};
|
|
@@ -29828,7 +29828,7 @@ function keccak256(data) {
|
|
|
29828
29828
|
return '0x' + sha3.keccak_256(arrayify(data));
|
|
29829
29829
|
}
|
|
29830
29830
|
|
|
29831
|
-
const version$e = "rlp/5.
|
|
29831
|
+
const version$e = "rlp/5.7.0";
|
|
29832
29832
|
|
|
29833
29833
|
const logger$i = new Logger(version$e);
|
|
29834
29834
|
function arrayifyInteger(value) {
|
|
@@ -29945,7 +29945,7 @@ function decode$2(data) {
|
|
|
29945
29945
|
return decoded.result;
|
|
29946
29946
|
}
|
|
29947
29947
|
|
|
29948
|
-
const version$d = "address/5.
|
|
29948
|
+
const version$d = "address/5.7.0";
|
|
29949
29949
|
|
|
29950
29950
|
const logger$h = new Logger(version$d);
|
|
29951
29951
|
function getChecksumAddress(address) {
|
|
@@ -30420,7 +30420,7 @@ class NumberCoder extends Coder {
|
|
|
30420
30420
|
}
|
|
30421
30421
|
}
|
|
30422
30422
|
|
|
30423
|
-
const version$c = "strings/5.
|
|
30423
|
+
const version$c = "strings/5.7.0";
|
|
30424
30424
|
|
|
30425
30425
|
const logger$f = new Logger(version$c);
|
|
30426
30426
|
///////////////////////////////
|
|
@@ -30788,7 +30788,7 @@ function id(text) {
|
|
|
30788
30788
|
return keccak256(toUtf8Bytes(text));
|
|
30789
30789
|
}
|
|
30790
30790
|
|
|
30791
|
-
const version$b = "hash/5.
|
|
30791
|
+
const version$b = "hash/5.7.0";
|
|
30792
30792
|
|
|
30793
30793
|
function decode$1(textData) {
|
|
30794
30794
|
textData = atob(textData);
|
|
@@ -32459,7 +32459,7 @@ var multicallV2Abi = [
|
|
|
32459
32459
|
}
|
|
32460
32460
|
];
|
|
32461
32461
|
|
|
32462
|
-
const version$a = "abstract-provider/5.
|
|
32462
|
+
const version$a = "abstract-provider/5.7.0";
|
|
32463
32463
|
|
|
32464
32464
|
var __awaiter$6 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
32465
32465
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -32521,7 +32521,7 @@ class Provider {
|
|
|
32521
32521
|
}
|
|
32522
32522
|
}
|
|
32523
32523
|
|
|
32524
|
-
const version$9 = "abstract-signer/5.
|
|
32524
|
+
const version$9 = "abstract-signer/5.7.0";
|
|
32525
32525
|
|
|
32526
32526
|
var __awaiter$5 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
32527
32527
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -34198,15 +34198,12 @@ utils.encode = utils_1.encode;
|
|
|
34198
34198
|
// Represent num in a w-NAF form
|
|
34199
34199
|
function getNAF(num, w, bits) {
|
|
34200
34200
|
var naf = new Array(Math.max(num.bitLength(), bits) + 1);
|
|
34201
|
-
|
|
34202
|
-
for (i = 0; i < naf.length; i += 1) {
|
|
34203
|
-
naf[i] = 0;
|
|
34204
|
-
}
|
|
34201
|
+
naf.fill(0);
|
|
34205
34202
|
|
|
34206
34203
|
var ws = 1 << (w + 1);
|
|
34207
34204
|
var k = num.clone();
|
|
34208
34205
|
|
|
34209
|
-
for (i = 0; i < naf.length; i++) {
|
|
34206
|
+
for (var i = 0; i < naf.length; i++) {
|
|
34210
34207
|
var z;
|
|
34211
34208
|
var mod = k.andln(ws - 1);
|
|
34212
34209
|
if (k.isOdd()) {
|
|
@@ -36092,8 +36089,8 @@ KeyPair.prototype.sign = function sign(msg, enc, options) {
|
|
|
36092
36089
|
return this.ec.sign(msg, this, enc, options);
|
|
36093
36090
|
};
|
|
36094
36091
|
|
|
36095
|
-
KeyPair.prototype.verify = function verify(msg, signature
|
|
36096
|
-
return this.ec.verify(msg, signature, this
|
|
36092
|
+
KeyPair.prototype.verify = function verify(msg, signature) {
|
|
36093
|
+
return this.ec.verify(msg, signature, this);
|
|
36097
36094
|
};
|
|
36098
36095
|
|
|
36099
36096
|
KeyPair.prototype.inspect = function inspect() {
|
|
@@ -36139,10 +36136,6 @@ function getLength(buf, p) {
|
|
|
36139
36136
|
return false;
|
|
36140
36137
|
}
|
|
36141
36138
|
|
|
36142
|
-
if(buf[p.place] === 0x00) {
|
|
36143
|
-
return false;
|
|
36144
|
-
}
|
|
36145
|
-
|
|
36146
36139
|
var val = 0;
|
|
36147
36140
|
for (var i = 0, off = p.place; i < octetLen; i++, off++) {
|
|
36148
36141
|
val <<= 8;
|
|
@@ -36191,9 +36184,6 @@ Signature.prototype._importDER = function _importDER(data, enc) {
|
|
|
36191
36184
|
if (rlen === false) {
|
|
36192
36185
|
return false;
|
|
36193
36186
|
}
|
|
36194
|
-
if ((data[p.place] & 128) !== 0) {
|
|
36195
|
-
return false;
|
|
36196
|
-
}
|
|
36197
36187
|
var r = data.slice(p.place, rlen + p.place);
|
|
36198
36188
|
p.place += rlen;
|
|
36199
36189
|
if (data[p.place++] !== 0x02) {
|
|
@@ -36206,9 +36196,6 @@ Signature.prototype._importDER = function _importDER(data, enc) {
|
|
|
36206
36196
|
if (data.length !== slen + p.place) {
|
|
36207
36197
|
return false;
|
|
36208
36198
|
}
|
|
36209
|
-
if ((data[p.place] & 128) !== 0) {
|
|
36210
|
-
return false;
|
|
36211
|
-
}
|
|
36212
36199
|
var s = data.slice(p.place, slen + p.place);
|
|
36213
36200
|
if (r[0] === 0) {
|
|
36214
36201
|
if (r[1] & 0x80) {
|
|
@@ -36354,27 +36341,8 @@ EC.prototype.genKeyPair = function genKeyPair(options) {
|
|
|
36354
36341
|
}
|
|
36355
36342
|
};
|
|
36356
36343
|
|
|
36357
|
-
EC.prototype._truncateToN = function _truncateToN(msg, truncOnly
|
|
36358
|
-
var byteLength;
|
|
36359
|
-
if (BN$1.isBN(msg) || typeof msg === 'number') {
|
|
36360
|
-
msg = new BN$1(msg, 16);
|
|
36361
|
-
byteLength = msg.byteLength();
|
|
36362
|
-
} else if (typeof msg === 'object') {
|
|
36363
|
-
// BN assumes an array-like input and asserts length
|
|
36364
|
-
byteLength = msg.length;
|
|
36365
|
-
msg = new BN$1(msg, 16);
|
|
36366
|
-
} else {
|
|
36367
|
-
// BN converts the value to string
|
|
36368
|
-
var str = msg.toString();
|
|
36369
|
-
// HEX encoding
|
|
36370
|
-
byteLength = (str.length + 1) >>> 1;
|
|
36371
|
-
msg = new BN$1(str, 16);
|
|
36372
|
-
}
|
|
36373
|
-
// Allow overriding
|
|
36374
|
-
if (typeof bitLength !== 'number') {
|
|
36375
|
-
bitLength = byteLength * 8;
|
|
36376
|
-
}
|
|
36377
|
-
var delta = bitLength - this.n.bitLength();
|
|
36344
|
+
EC.prototype._truncateToN = function _truncateToN(msg, truncOnly) {
|
|
36345
|
+
var delta = msg.byteLength() * 8 - this.n.bitLength();
|
|
36378
36346
|
if (delta > 0)
|
|
36379
36347
|
msg = msg.ushrn(delta);
|
|
36380
36348
|
if (!truncOnly && msg.cmp(this.n) >= 0)
|
|
@@ -36391,18 +36359,8 @@ EC.prototype.sign = function sign(msg, key, enc, options) {
|
|
|
36391
36359
|
if (!options)
|
|
36392
36360
|
options = {};
|
|
36393
36361
|
|
|
36394
|
-
if (typeof msg !== 'string' && typeof msg !== 'number' && !BN$1.isBN(msg)) {
|
|
36395
|
-
assert$5(typeof msg === 'object' && msg && typeof msg.length === 'number',
|
|
36396
|
-
'Expected message to be an array-like, a hex string, or a BN instance');
|
|
36397
|
-
assert$5((msg.length >>> 0) === msg.length); // non-negative 32-bit integer
|
|
36398
|
-
for (var i = 0; i < msg.length; i++) assert$5((msg[i] & 255) === msg[i]);
|
|
36399
|
-
}
|
|
36400
|
-
|
|
36401
36362
|
key = this.keyFromPrivate(key, enc);
|
|
36402
|
-
msg = this._truncateToN(msg,
|
|
36403
|
-
|
|
36404
|
-
// Would fail further checks, but let's make the error message clear
|
|
36405
|
-
assert$5(!msg.isNeg(), 'Can not sign a negative message');
|
|
36363
|
+
msg = this._truncateToN(new BN$1(msg, 16));
|
|
36406
36364
|
|
|
36407
36365
|
// Zero-extend key to provide enough entropy
|
|
36408
36366
|
var bytes = this.n.byteLength();
|
|
@@ -36411,9 +36369,6 @@ EC.prototype.sign = function sign(msg, key, enc, options) {
|
|
|
36411
36369
|
// Zero-extend nonce to have the same byte size as N
|
|
36412
36370
|
var nonce = msg.toArray('be', bytes);
|
|
36413
36371
|
|
|
36414
|
-
// Recheck nonce to be bijective to msg
|
|
36415
|
-
assert$5((new BN$1(nonce)).eq(msg), 'Can not sign message');
|
|
36416
|
-
|
|
36417
36372
|
// Instantiate Hmac_DRBG
|
|
36418
36373
|
var drbg = new hmacDrbg({
|
|
36419
36374
|
hash: this.hash,
|
|
@@ -36461,11 +36416,8 @@ EC.prototype.sign = function sign(msg, key, enc, options) {
|
|
|
36461
36416
|
}
|
|
36462
36417
|
};
|
|
36463
36418
|
|
|
36464
|
-
EC.prototype.verify = function verify(msg, signature$1, key, enc
|
|
36465
|
-
|
|
36466
|
-
options = {};
|
|
36467
|
-
|
|
36468
|
-
msg = this._truncateToN(msg, false, options.msgBitLength);
|
|
36419
|
+
EC.prototype.verify = function verify(msg, signature$1, key, enc) {
|
|
36420
|
+
msg = this._truncateToN(new BN$1(msg, 16));
|
|
36469
36421
|
key = this.keyFromPublic(key, enc);
|
|
36470
36422
|
signature$1 = new signature(signature$1, 'hex');
|
|
36471
36423
|
|
|
@@ -36557,7 +36509,7 @@ var elliptic_1 = createCommonjsModule(function (module, exports$1) {
|
|
|
36557
36509
|
|
|
36558
36510
|
var elliptic = exports$1;
|
|
36559
36511
|
|
|
36560
|
-
elliptic.version = /*RicMoo:ethers*/{ version: "6.
|
|
36512
|
+
elliptic.version = /*RicMoo:ethers*/{ version: "6.5.4" }.version;
|
|
36561
36513
|
elliptic.utils = utils_1$1;
|
|
36562
36514
|
elliptic.rand = /*RicMoo:ethers:require(brorand)*/(function() { throw new Error('unsupported'); });
|
|
36563
36515
|
elliptic.curve = curve_1;
|
|
@@ -36570,7 +36522,7 @@ elliptic.eddsa = /*RicMoo:ethers:require(./elliptic/eddsa)*/(null);
|
|
|
36570
36522
|
|
|
36571
36523
|
var EC$1 = elliptic_1.ec;
|
|
36572
36524
|
|
|
36573
|
-
const version$8 = "signing-key/5.
|
|
36525
|
+
const version$8 = "signing-key/5.7.0";
|
|
36574
36526
|
|
|
36575
36527
|
const logger$8 = new Logger(version$8);
|
|
36576
36528
|
let _curve = null;
|
|
@@ -36641,7 +36593,7 @@ function computePublicKey(key, compressed) {
|
|
|
36641
36593
|
return logger$8.throwArgumentError("invalid public or private key", "key", "[REDACTED]");
|
|
36642
36594
|
}
|
|
36643
36595
|
|
|
36644
|
-
const version$7 = "transactions/5.
|
|
36596
|
+
const version$7 = "transactions/5.7.0";
|
|
36645
36597
|
|
|
36646
36598
|
const logger$7 = new Logger(version$7);
|
|
36647
36599
|
var TransactionTypes;
|
|
@@ -36911,7 +36863,7 @@ function parse$1(rawTransaction) {
|
|
|
36911
36863
|
});
|
|
36912
36864
|
}
|
|
36913
36865
|
|
|
36914
|
-
const version$6 = "contracts/5.
|
|
36866
|
+
const version$6 = "contracts/5.7.0";
|
|
36915
36867
|
|
|
36916
36868
|
var __awaiter$4 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36917
36869
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -37666,7 +37618,7 @@ class BaseContract {
|
|
|
37666
37618
|
logger$6.throwError("events require a provider or a signer with a provider", Logger.errors.UNSUPPORTED_OPERATION, { operation: "once" });
|
|
37667
37619
|
}
|
|
37668
37620
|
runningEvent.addListener(listener, once);
|
|
37669
|
-
// Track this running event and its listeners (may already be there; but no
|
|
37621
|
+
// Track this running event and its listeners (may already be there; but no hard in updating)
|
|
37670
37622
|
this._runningEvents[runningEvent.tag] = runningEvent;
|
|
37671
37623
|
// If we are not polling the provider, start polling
|
|
37672
37624
|
if (!this._wrappedEmits[runningEvent.tag]) {
|
|
@@ -37913,7 +37865,7 @@ function sha256(data) {
|
|
|
37913
37865
|
return "0x" + (hash.sha256().update(arrayify(data)).digest("hex"));
|
|
37914
37866
|
}
|
|
37915
37867
|
|
|
37916
|
-
const version$5 = "networks/5.
|
|
37868
|
+
const version$5 = "networks/5.7.1";
|
|
37917
37869
|
|
|
37918
37870
|
const logger$5 = new Logger(version$5);
|
|
37919
37871
|
function isRenetworkable(value) {
|
|
@@ -37973,12 +37925,6 @@ function ethDefaultProvider(network) {
|
|
|
37973
37925
|
}
|
|
37974
37926
|
catch (error) { }
|
|
37975
37927
|
}
|
|
37976
|
-
if (providers.QuickNodeProvider && options.quicknode !== "-") {
|
|
37977
|
-
try {
|
|
37978
|
-
providerList.push(new providers.QuickNodeProvider(network, options.quicknode));
|
|
37979
|
-
}
|
|
37980
|
-
catch (error) { }
|
|
37981
|
-
}
|
|
37982
37928
|
if (providerList.length === 0) {
|
|
37983
37929
|
return null;
|
|
37984
37930
|
}
|
|
@@ -38056,15 +38002,9 @@ const networks = {
|
|
|
38056
38002
|
kintsugi: { chainId: 1337702, name: "kintsugi" },
|
|
38057
38003
|
sepolia: {
|
|
38058
38004
|
chainId: 11155111,
|
|
38059
|
-
ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
|
|
38060
38005
|
name: "sepolia",
|
|
38061
38006
|
_defaultProvider: ethDefaultProvider("sepolia")
|
|
38062
38007
|
},
|
|
38063
|
-
holesky: {
|
|
38064
|
-
chainId: 17000,
|
|
38065
|
-
name: "holesky",
|
|
38066
|
-
_defaultProvider: ethDefaultProvider("holesky")
|
|
38067
|
-
},
|
|
38068
38008
|
// ETC (See: #351)
|
|
38069
38009
|
classic: {
|
|
38070
38010
|
chainId: 61,
|
|
@@ -38085,11 +38025,7 @@ const networks = {
|
|
|
38085
38025
|
name: "matic",
|
|
38086
38026
|
_defaultProvider: ethDefaultProvider("matic")
|
|
38087
38027
|
},
|
|
38088
|
-
maticmum: {
|
|
38089
|
-
chainId: 80001,
|
|
38090
|
-
name: "maticmum",
|
|
38091
|
-
_defaultProvider: ethDefaultProvider("maticmum")
|
|
38092
|
-
},
|
|
38028
|
+
maticmum: { chainId: 80001, name: "maticmum" },
|
|
38093
38029
|
optimism: {
|
|
38094
38030
|
chainId: 10,
|
|
38095
38031
|
name: "optimism",
|
|
@@ -38097,11 +38033,9 @@ const networks = {
|
|
|
38097
38033
|
},
|
|
38098
38034
|
"optimism-kovan": { chainId: 69, name: "optimism-kovan" },
|
|
38099
38035
|
"optimism-goerli": { chainId: 420, name: "optimism-goerli" },
|
|
38100
|
-
"optimism-sepolia": { chainId: 11155420, name: "optimism-sepolia" },
|
|
38101
38036
|
arbitrum: { chainId: 42161, name: "arbitrum" },
|
|
38102
38037
|
"arbitrum-rinkeby": { chainId: 421611, name: "arbitrum-rinkeby" },
|
|
38103
38038
|
"arbitrum-goerli": { chainId: 421613, name: "arbitrum-goerli" },
|
|
38104
|
-
"arbitrum-sepolia": { chainId: 421614, name: "arbitrum-sepolia" },
|
|
38105
38039
|
bnb: { chainId: 56, name: "bnb" },
|
|
38106
38040
|
bnbt: { chainId: 97, name: "bnbt" },
|
|
38107
38041
|
};
|
|
@@ -38177,7 +38111,7 @@ function getNetwork(network) {
|
|
|
38177
38111
|
};
|
|
38178
38112
|
}
|
|
38179
38113
|
|
|
38180
|
-
const version$4 = "web/5.
|
|
38114
|
+
const version$4 = "web/5.7.1";
|
|
38181
38115
|
|
|
38182
38116
|
var __awaiter$3 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
38183
38117
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -38824,7 +38758,7 @@ var bech32 = {
|
|
|
38824
38758
|
|
|
38825
38759
|
var bech32$1 = /*@__PURE__*/getDefaultExportFromCjs(bech32);
|
|
38826
38760
|
|
|
38827
|
-
const version$3 = "providers/5.
|
|
38761
|
+
const version$3 = "providers/5.7.2";
|
|
38828
38762
|
|
|
38829
38763
|
const logger$3 = new Logger(version$3);
|
|
38830
38764
|
class Formatter {
|
|
@@ -41888,7 +41822,7 @@ class JsonRpcProvider extends BaseProvider {
|
|
|
41888
41822
|
}
|
|
41889
41823
|
}
|
|
41890
41824
|
|
|
41891
|
-
const version$2 = "units/5.
|
|
41825
|
+
const version$2 = "units/5.7.0";
|
|
41892
41826
|
|
|
41893
41827
|
const logger = new Logger(version$2);
|
|
41894
41828
|
const names$2 = [
|
|
@@ -41932,7 +41866,7 @@ lodash.exports;
|
|
|
41932
41866
|
var undefined$1;
|
|
41933
41867
|
|
|
41934
41868
|
/** Used as the semantic version number. */
|
|
41935
|
-
var VERSION = '4.17.
|
|
41869
|
+
var VERSION = '4.17.21';
|
|
41936
41870
|
|
|
41937
41871
|
/** Used as the size to enable large array optimizations. */
|
|
41938
41872
|
var LARGE_ARRAY_SIZE = 200;
|
|
@@ -45686,7 +45620,7 @@ lodash.exports;
|
|
|
45686
45620
|
if (isArray(iteratee)) {
|
|
45687
45621
|
return function(value) {
|
|
45688
45622
|
return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
|
|
45689
|
-
}
|
|
45623
|
+
}
|
|
45690
45624
|
}
|
|
45691
45625
|
return iteratee;
|
|
45692
45626
|
});
|
|
@@ -46290,47 +46224,8 @@ lodash.exports;
|
|
|
46290
46224
|
*/
|
|
46291
46225
|
function baseUnset(object, path) {
|
|
46292
46226
|
path = castPath(path, object);
|
|
46293
|
-
|
|
46294
|
-
|
|
46295
|
-
var index = -1,
|
|
46296
|
-
length = path.length;
|
|
46297
|
-
|
|
46298
|
-
if (!length) {
|
|
46299
|
-
return true;
|
|
46300
|
-
}
|
|
46301
|
-
|
|
46302
|
-
var isRootPrimitive = object == null || (typeof object !== 'object' && typeof object !== 'function');
|
|
46303
|
-
|
|
46304
|
-
while (++index < length) {
|
|
46305
|
-
var key = path[index];
|
|
46306
|
-
|
|
46307
|
-
// skip non-string keys (e.g., Symbols, numbers)
|
|
46308
|
-
if (typeof key !== 'string') {
|
|
46309
|
-
continue;
|
|
46310
|
-
}
|
|
46311
|
-
|
|
46312
|
-
// Always block "__proto__" anywhere in the path if it's not expected
|
|
46313
|
-
if (key === '__proto__' && !hasOwnProperty.call(object, '__proto__')) {
|
|
46314
|
-
return false;
|
|
46315
|
-
}
|
|
46316
|
-
|
|
46317
|
-
// Block "constructor.prototype" chains
|
|
46318
|
-
if (key === 'constructor' &&
|
|
46319
|
-
(index + 1) < length &&
|
|
46320
|
-
typeof path[index + 1] === 'string' &&
|
|
46321
|
-
path[index + 1] === 'prototype') {
|
|
46322
|
-
|
|
46323
|
-
// Allow ONLY when the path starts at a primitive root, e.g., _.unset(0, 'constructor.prototype.a')
|
|
46324
|
-
if (isRootPrimitive && index === 0) {
|
|
46325
|
-
continue;
|
|
46326
|
-
}
|
|
46327
|
-
|
|
46328
|
-
return false;
|
|
46329
|
-
}
|
|
46330
|
-
}
|
|
46331
|
-
|
|
46332
|
-
var obj = parent(object, path);
|
|
46333
|
-
return obj == null || delete obj[toKey(last(path))];
|
|
46227
|
+
object = parent(object, path);
|
|
46228
|
+
return object == null || delete object[toKey(last(path))];
|
|
46334
46229
|
}
|
|
46335
46230
|
|
|
46336
46231
|
/**
|
|
@@ -70859,6 +70754,142 @@ const fetchUserOwnedBills = (chainId, account, bonds, tokenPrices) => __awaiter$
|
|
|
70859
70754
|
return result;
|
|
70860
70755
|
});
|
|
70861
70756
|
|
|
70757
|
+
// Minimal ABI for the vesting NFT contract - only methods we need
|
|
70758
|
+
const VESTING_NFT_ABI = [
|
|
70759
|
+
{
|
|
70760
|
+
inputs: [{ internalType: 'address', name: 'owner', type: 'address' }],
|
|
70761
|
+
name: 'balanceOf',
|
|
70762
|
+
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
|
70763
|
+
stateMutability: 'view',
|
|
70764
|
+
type: 'function',
|
|
70765
|
+
},
|
|
70766
|
+
{
|
|
70767
|
+
inputs: [
|
|
70768
|
+
{ internalType: 'address', name: 'owner', type: 'address' },
|
|
70769
|
+
{ internalType: 'uint256', name: 'index', type: 'uint256' },
|
|
70770
|
+
],
|
|
70771
|
+
name: 'tokenOfOwnerByIndex',
|
|
70772
|
+
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
|
70773
|
+
stateMutability: 'view',
|
|
70774
|
+
type: 'function',
|
|
70775
|
+
},
|
|
70776
|
+
{
|
|
70777
|
+
inputs: [{ internalType: 'uint256', name: 'tokenId', type: 'uint256' }],
|
|
70778
|
+
name: 'getVestingSchedule',
|
|
70779
|
+
outputs: [
|
|
70780
|
+
{
|
|
70781
|
+
components: [
|
|
70782
|
+
{ internalType: 'address', name: 'payoutToken', type: 'address' },
|
|
70783
|
+
{ internalType: 'uint256', name: 'totalPayout', type: 'uint256' },
|
|
70784
|
+
{ internalType: 'uint256', name: 'payoutClaimed', type: 'uint256' },
|
|
70785
|
+
{ internalType: 'uint128', name: 'vestingStart', type: 'uint128' },
|
|
70786
|
+
{ internalType: 'uint128', name: 'vestingEnd', type: 'uint128' },
|
|
70787
|
+
{ internalType: 'uint128', name: 'cliffEnd', type: 'uint128' },
|
|
70788
|
+
],
|
|
70789
|
+
internalType: 'struct TransferableVestingNFT.VestingSchedule',
|
|
70790
|
+
name: '',
|
|
70791
|
+
type: 'tuple',
|
|
70792
|
+
},
|
|
70793
|
+
],
|
|
70794
|
+
stateMutability: 'view',
|
|
70795
|
+
type: 'function',
|
|
70796
|
+
},
|
|
70797
|
+
{
|
|
70798
|
+
inputs: [{ internalType: 'uint256', name: 'tokenId', type: 'uint256' }],
|
|
70799
|
+
name: 'claimablePayout',
|
|
70800
|
+
outputs: [{ internalType: 'uint256', name: 'payout', type: 'uint256' }],
|
|
70801
|
+
stateMutability: 'view',
|
|
70802
|
+
type: 'function',
|
|
70803
|
+
},
|
|
70804
|
+
];
|
|
70805
|
+
// Hardcoded vesting NFT contract address
|
|
70806
|
+
const VESTING_NFT_ADDRESS$1 = '0xD97197A4bC1db9e160023271B6C6de5B3325b7fd';
|
|
70807
|
+
const VESTING_NFT_CHAIN_ID = main.ChainId.BASE;
|
|
70808
|
+
const fetchVestingNftBills = (account) => __awaiter$9(void 0, void 0, void 0, function* () {
|
|
70809
|
+
try {
|
|
70810
|
+
// Get balance first
|
|
70811
|
+
const balanceCalls = [
|
|
70812
|
+
{
|
|
70813
|
+
address: VESTING_NFT_ADDRESS$1,
|
|
70814
|
+
name: 'balanceOf',
|
|
70815
|
+
params: [account],
|
|
70816
|
+
},
|
|
70817
|
+
];
|
|
70818
|
+
const balanceResult = yield multicall(VESTING_NFT_CHAIN_ID, VESTING_NFT_ABI, balanceCalls);
|
|
70819
|
+
const balance = new BigNumber$1(balanceResult[0][0].toString()).toNumber();
|
|
70820
|
+
if (balance === 0)
|
|
70821
|
+
return [];
|
|
70822
|
+
// Get all token IDs
|
|
70823
|
+
const tokenIdCalls = Array.from({ length: balance }, (_, i) => ({
|
|
70824
|
+
address: VESTING_NFT_ADDRESS$1,
|
|
70825
|
+
name: 'tokenOfOwnerByIndex',
|
|
70826
|
+
params: [account, i],
|
|
70827
|
+
}));
|
|
70828
|
+
const tokenIdResults = yield multicall(VESTING_NFT_CHAIN_ID, VESTING_NFT_ABI, tokenIdCalls);
|
|
70829
|
+
const tokenIds = tokenIdResults.map((r) => r[0].toString());
|
|
70830
|
+
// Get vesting schedule and claimable for each token
|
|
70831
|
+
const detailCalls = tokenIds.flatMap((tokenId) => [
|
|
70832
|
+
{
|
|
70833
|
+
address: VESTING_NFT_ADDRESS$1,
|
|
70834
|
+
name: 'getVestingSchedule',
|
|
70835
|
+
params: [tokenId],
|
|
70836
|
+
},
|
|
70837
|
+
{
|
|
70838
|
+
address: VESTING_NFT_ADDRESS$1,
|
|
70839
|
+
name: 'claimablePayout',
|
|
70840
|
+
params: [tokenId],
|
|
70841
|
+
},
|
|
70842
|
+
]);
|
|
70843
|
+
const detailResults = yield multicall(VESTING_NFT_CHAIN_ID, VESTING_NFT_ABI, detailCalls);
|
|
70844
|
+
const result = [];
|
|
70845
|
+
for (let i = 0; i < tokenIds.length; i++) {
|
|
70846
|
+
const scheduleResult = detailResults[i * 2];
|
|
70847
|
+
const claimableResult = detailResults[i * 2 + 1];
|
|
70848
|
+
const schedule = scheduleResult[0];
|
|
70849
|
+
const totalPayout = new BigNumber$1(schedule.totalPayout.toString());
|
|
70850
|
+
const payoutClaimed = new BigNumber$1(schedule.payoutClaimed.toString());
|
|
70851
|
+
const vestingStart = new BigNumber$1(schedule.vestingStart.toString()).toNumber();
|
|
70852
|
+
const vestingEnd = new BigNumber$1(schedule.vestingEnd.toString()).toNumber();
|
|
70853
|
+
const cliffEnd = new BigNumber$1(schedule.cliffEnd.toString()).toNumber();
|
|
70854
|
+
const claimable = new BigNumber$1(claimableResult[0].toString());
|
|
70855
|
+
// Calculate durations in seconds (expected by displayHelpers)
|
|
70856
|
+
const vestingDuration = vestingEnd - vestingStart;
|
|
70857
|
+
const vestingCliff = cliffEnd - vestingStart;
|
|
70858
|
+
// Map to UserBill format
|
|
70859
|
+
result.push({
|
|
70860
|
+
address: VESTING_NFT_ADDRESS$1,
|
|
70861
|
+
id: tokenIds[i],
|
|
70862
|
+
vesting: vestingDuration.toString(), // vesting duration in seconds
|
|
70863
|
+
payout: totalPayout.minus(payoutClaimed).toString(), // remaining payout
|
|
70864
|
+
totalPayout: totalPayout.toString(),
|
|
70865
|
+
truePricePaid: '0',
|
|
70866
|
+
lastBlockTimestamp: vestingStart.toString(),
|
|
70867
|
+
pendingRewards: claimable.toString(),
|
|
70868
|
+
billNftAddress: VESTING_NFT_ADDRESS$1,
|
|
70869
|
+
payoutClaimed: payoutClaimed.toString(),
|
|
70870
|
+
bond: {
|
|
70871
|
+
billType: 'vesting',
|
|
70872
|
+
chainId: VESTING_NFT_CHAIN_ID,
|
|
70873
|
+
contractAddress: { [VESTING_NFT_CHAIN_ID]: VESTING_NFT_ADDRESS$1 },
|
|
70874
|
+
billNnftAddress: { [VESTING_NFT_CHAIN_ID]: VESTING_NFT_ADDRESS$1 },
|
|
70875
|
+
vestingCliff: vestingCliff > 0 ? vestingCliff : undefined,
|
|
70876
|
+
earnToken: {
|
|
70877
|
+
symbol: 'GOO',
|
|
70878
|
+
name: 'Goo Token',
|
|
70879
|
+
address: { [VESTING_NFT_CHAIN_ID]: schedule.payoutToken },
|
|
70880
|
+
decimals: { [VESTING_NFT_CHAIN_ID]: 18 },
|
|
70881
|
+
},
|
|
70882
|
+
},
|
|
70883
|
+
});
|
|
70884
|
+
}
|
|
70885
|
+
return result;
|
|
70886
|
+
}
|
|
70887
|
+
catch (error) {
|
|
70888
|
+
console.error('Error fetching vesting NFT bills:', error);
|
|
70889
|
+
return [];
|
|
70890
|
+
}
|
|
70891
|
+
});
|
|
70892
|
+
|
|
70862
70893
|
function useUserBonds() {
|
|
70863
70894
|
var _a;
|
|
70864
70895
|
// First fetch the full list of bonds
|
|
@@ -70905,7 +70936,10 @@ const getUserBonds = (account, bondList, chains, tokenPrices, apiUrl) => __await
|
|
|
70905
70936
|
const fulfilledResults = results
|
|
70906
70937
|
.filter((result) => result.status === 'fulfilled')
|
|
70907
70938
|
.map((result) => result.value);
|
|
70908
|
-
|
|
70939
|
+
const regularBonds = fulfilledResults.flat().flatMap((result) => result.userOwnedBills);
|
|
70940
|
+
// Fetch vesting NFT bills and merge
|
|
70941
|
+
const vestingNftBills = yield fetchVestingNftBills(account);
|
|
70942
|
+
return [...regularBonds, ...vestingNftBills];
|
|
70909
70943
|
}
|
|
70910
70944
|
catch (e) {
|
|
70911
70945
|
reportError$1({
|
|
@@ -70918,8 +70952,19 @@ const getUserBonds = (account, bondList, chains, tokenPrices, apiUrl) => __await
|
|
|
70918
70952
|
}
|
|
70919
70953
|
});
|
|
70920
70954
|
|
|
70955
|
+
// Minimal ABI for vesting NFT claim
|
|
70956
|
+
const VESTING_NFT_CLAIM_ABI$1 = [
|
|
70957
|
+
{
|
|
70958
|
+
inputs: [{ internalType: 'uint256', name: 'tokenId', type: 'uint256' }],
|
|
70959
|
+
name: 'claim',
|
|
70960
|
+
outputs: [],
|
|
70961
|
+
stateMutability: 'nonpayable',
|
|
70962
|
+
type: 'function',
|
|
70963
|
+
},
|
|
70964
|
+
];
|
|
70965
|
+
const VESTING_NFT_ADDRESS = '0xD97197A4bC1db9e160023271B6C6de5B3325b7fd';
|
|
70921
70966
|
const YourBondsModal = ({ onDismiss, bill }) => {
|
|
70922
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u,
|
|
70967
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20;
|
|
70923
70968
|
// Hooks
|
|
70924
70969
|
const SDKConfig = useSDKConfig();
|
|
70925
70970
|
const chainId = useChainId();
|
|
@@ -70939,19 +70984,22 @@ const YourBondsModal = ({ onDismiss, bill }) => {
|
|
|
70939
70984
|
const load = loadingTx || (isLoading && !isConfirmed);
|
|
70940
70985
|
// Cliff display info:
|
|
70941
70986
|
const vestingCliff = (_c = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _c === void 0 ? void 0 : _c.vestingCliff;
|
|
70987
|
+
console.log(userBill);
|
|
70942
70988
|
const currentTime = Math.round(new Date().getTime() / 1000);
|
|
70943
70989
|
const lastBlockTimestamp = parseInt((_d = userBill === null || userBill === void 0 ? void 0 : userBill.lastBlockTimestamp) !== null && _d !== void 0 ? _d : '0');
|
|
70944
70990
|
const isPendingCliff = vestingCliff ? currentTime - lastBlockTimestamp < vestingCliff : false;
|
|
70945
70991
|
const cliffCountdown = getTimePeriods(lastBlockTimestamp + (vestingCliff !== null && vestingCliff !== void 0 ? vestingCliff : 0) - currentTime, true);
|
|
70992
|
+
const showImage = false;
|
|
70946
70993
|
const handleClaim = (billId, billAddress) => __awaiter$9(void 0, void 0, void 0, function* () {
|
|
70947
70994
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
70948
70995
|
const address = billAddress;
|
|
70996
|
+
const isVestingNft = (billAddress === null || billAddress === void 0 ? void 0 : billAddress.toLowerCase()) === VESTING_NFT_ADDRESS.toLowerCase();
|
|
70949
70997
|
try {
|
|
70950
70998
|
setLoadingTx(true);
|
|
70951
70999
|
const tx = yield writeContractAsync({
|
|
70952
71000
|
address: address,
|
|
70953
|
-
abi: BOND_ABI,
|
|
70954
|
-
functionName: 'redeem',
|
|
71001
|
+
abi: isVestingNft ? VESTING_NFT_CLAIM_ABI$1 : BOND_ABI,
|
|
71002
|
+
functionName: isVestingNft ? 'claim' : 'redeem',
|
|
70955
71003
|
args: [billId],
|
|
70956
71004
|
chain: chainId,
|
|
70957
71005
|
account: account,
|
|
@@ -70999,10 +71047,7 @@ const YourBondsModal = ({ onDismiss, bill }) => {
|
|
|
70999
71047
|
};
|
|
71000
71048
|
const earnTokenPrice = useCurrencyPrice((_f = (_e = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _e === void 0 ? void 0 : _e.earnToken) !== null && _f !== void 0 ? _f : null, (_h = (_g = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _g === void 0 ? void 0 : _g.chainId) !== null && _h !== void 0 ? _h : null);
|
|
71001
71049
|
const BILL_ATTRIBUTES = ['The Legend', 'The Location', 'The Moment', 'The Trend', 'The Innovation'];
|
|
71002
|
-
|
|
71003
|
-
const handleImageLoad = () => {
|
|
71004
|
-
setImgLoaded(true);
|
|
71005
|
-
};
|
|
71050
|
+
(_j = bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.attributes) === null || _j === void 0 ? void 0 : _j.filter((attrib) => BILL_ATTRIBUTES.includes(attrib.trait_type));
|
|
71006
71051
|
const [onTransferBondModal] = useModal(jsx$2(TransferBondModal, { userBill: userBill }), true, true, `transferModal${userBill === null || userBill === void 0 ? void 0 : userBill.id}}`);
|
|
71007
71052
|
useEffect(() => {
|
|
71008
71053
|
if (isConfirmed) {
|
|
@@ -71011,32 +71056,9 @@ const YourBondsModal = ({ onDismiss, bill }) => {
|
|
|
71011
71056
|
}
|
|
71012
71057
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
71013
71058
|
}, [isConfirmed]);
|
|
71014
|
-
return (jsx$2(Modal, { className: "modal", children: jsxs(Flex$1, { className: "yourbondsmodal-content", children: [jsx$2(Flex$1, { className: "yourbondsmodal-header", children: jsx$2(Flex$1, { className: "svg-close", onClick: onDismiss, children: jsx$2(Svg, { icon: "close" }) }) }), jsxs(Flex$1, { className: "yourbondsmodal table-container", children: [jsxs(Flex$1, { className: "yourbondsmodal
|
|
71015
|
-
position: 'absolute',
|
|
71016
|
-
top: 'calc(50% - 24px)',
|
|
71017
|
-
right: 'calc(50% - 50px)',
|
|
71018
|
-
justifyContent: 'center',
|
|
71019
|
-
alignItems: 'center',
|
|
71020
|
-
zIndex: 1,
|
|
71021
|
-
}, children: jsx$2(Spinner, { width: 100 }) }))] }), jsxs(Flex$1, { className: "yourbondsmodal yourbondinfo", children: [jsxs(Flex$1, { className: "yourbondinfo title-container", children: [jsx$2(Flex$1, { className: "title-container bondicon", children: userBill && (jsx$2(TokenImage, { symbol: (_l = (_k = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _k === void 0 ? void 0 : _k.showcaseTokenName) !== null && _l !== void 0 ? _l : (_o = (_m = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _m === void 0 ? void 0 : _m.earnToken) === null || _o === void 0 ? void 0 : _o.symbol, size: 40, chain: (_p = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _p === void 0 ? void 0 : _p.chainId })) }), jsx$2(Flex$1, { className: "title-container tokenname", children: (_r = (_q = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _q === void 0 ? void 0 : _q.showcaseTokenName) !== null && _r !== void 0 ? _r : (_s = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _s === void 0 ? void 0 : _s.earnToken.symbol }), jsx$2(Flex$1, { className: "title-container tokentags", children: (_u = (_t = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _t === void 0 ? void 0 : _t.tags) === null || _u === void 0 ? void 0 : _u.slice(0, 1).map((tag) => {
|
|
71059
|
+
return (jsx$2(Modal, { className: "modal", children: jsxs(Flex$1, { className: "yourbondsmodal-content", children: [jsx$2(Flex$1, { className: "yourbondsmodal-header", children: jsx$2(Flex$1, { className: "svg-close", onClick: onDismiss, children: jsx$2(Svg, { icon: "close" }) }) }), jsxs(Flex$1, { className: "yourbondsmodal table-container", children: [showImage, jsxs(Flex$1, { className: "yourbondsmodal yourbondinfo", children: [jsxs(Flex$1, { className: "yourbondinfo title-container", children: [jsx$2(Flex$1, { className: "title-container bondicon", children: userBill && (jsx$2(TokenImage, { symbol: (_l = (_k = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _k === void 0 ? void 0 : _k.showcaseTokenName) !== null && _l !== void 0 ? _l : (_o = (_m = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _m === void 0 ? void 0 : _m.earnToken) === null || _o === void 0 ? void 0 : _o.symbol, size: 40, chain: (_p = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _p === void 0 ? void 0 : _p.chainId })) }), jsx$2(Flex$1, { className: "title-container tokenname", children: (_r = (_q = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _q === void 0 ? void 0 : _q.showcaseTokenName) !== null && _r !== void 0 ? _r : (_s = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _s === void 0 ? void 0 : _s.earnToken.symbol }), jsx$2(Flex$1, { className: "title-container tokentags", children: (_u = (_t = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _t === void 0 ? void 0 : _t.tags) === null || _u === void 0 ? void 0 : _u.slice(0, 1).map((tag) => {
|
|
71022
71060
|
return (jsx$2(Flex$1, { sx: { marginRight: '10px' }, children: jsx$2(ListTag, { text: tag === null || tag === void 0 ? void 0 : tag.toUpperCase() }) }, tag));
|
|
71023
|
-
}) }), jsxs(Text, { sx: { color: 'text', opacity: '0.6', fontSize: ['12px', '12px', '12px', '16px'] }, children: ["#", userBill === null || userBill === void 0 ? void 0 : userBill.id] })] }), jsxs(Flex$1, { className: "yourbondinfo blocks-container", children: [jsxs(Flex$1, { className: "
|
|
71024
|
-
borderRadius: `${isOpenTraits ? '6px 6px 0px 0px' : 'normal'}`,
|
|
71025
|
-
}, onClick: () => setIsOpenTraits(!isOpenTraits), children: [jsxs(Flex$1, { sx: { gap: '10px', alignItems: 'center' }, children: [jsx$2(Svg, { icon: "tag", direction: "down" }), jsx$2(Text, { sx: { fontSize: '12px', fontWeight: 400, color: 'text', opacity: '0.6' }, children: "Traits" })] }), jsx$2(Svg, { icon: "caret", direction: isOpenTraits ? 'up' : 'down' })] }), ((_v = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _v === void 0 ? void 0 : _v.billType) === 'staking' && (jsxs(Flex$1, { sx: {
|
|
71026
|
-
p: '5px 10px',
|
|
71027
|
-
width: '100%',
|
|
71028
|
-
background: '#8E568F',
|
|
71029
|
-
borderRadius: 'normal',
|
|
71030
|
-
mt: '10px',
|
|
71031
|
-
fontSize: '12px',
|
|
71032
|
-
fontWeight: 400,
|
|
71033
|
-
justifyContent: 'center',
|
|
71034
|
-
display: 'block',
|
|
71035
|
-
}, children: ["Tokens bought through this bond went directly to the", ' ', jsx$2("span", { onClick: () => window.open('https://basepad.finance/earn', '_blank'), style: { textDecoration: 'underline', cursor: 'pointer', color: 'blue' }, children: "$BPAD staking pool" }), ' ', "with a 365 days lock."] })), jsx$2(AnimatePresence, { children: isOpenTraits && (jsx$2(motion.div, { initial: { height: 0 }, animate: { height: 'fit-content' }, transition: { opacity: { duration: 0.2 } }, exit: { height: 0 }, sx: { overflow: 'hidden', width: '100%' }, children: jsx$2(Flex$1, { sx: { flexDirection: 'column', gap: '1px' }, children: attributes
|
|
71036
|
-
? attributes.map((a) => (jsxs(Flex$1, { sx: { background: 'white4', width: '100%', padding: '2px 8px' }, children: [jsx$2(Text, { sx: { fontSize: '10px', fontWeight: 500 }, children: a === null || a === void 0 ? void 0 : a.trait_type }), jsx$2(Text, { sx: { fontSize: '10px', fontWeight: 500 }, children: a === null || a === void 0 ? void 0 : a.value })] }, a.value)))
|
|
71037
|
-
: BILL_ATTRIBUTES.map((attrib) => {
|
|
71038
|
-
return (jsxs(Flex$1, { sx: { background: 'white4', width: '100%', padding: '2px 8px' }, children: [jsx$2(Text, { sx: { fontSize: '10px', fontWeight: 500 }, children: attrib }), jsx$2(Skeleton, { width: "150px" })] }, attrib));
|
|
71039
|
-
}) }) })) })] }), ((_w = bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.data) === null || _w === void 0 ? void 0 : _w.deposit) && (jsxs(Flex$1, { className: "yourbondinfo-block row-vested", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "You Spent" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.YouSpent }), width: "270px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsx$2(Flex$1, { className: "yourbondinfo-block info", children: jsx$2(Flex$1, { className: "block-info text", children: jsxs(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: ["$", (_x = bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.data) === null || _x === void 0 ? void 0 : _x.dollarValue.toFixed(2)] }) }) })] })), jsxs(Flex$1, { className: "yourbondinfo-block row-vested", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "Fully Vested" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.FullyVested }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsxs(Flex$1, { className: "yourbondinfo-block info", children: [jsx$2(Flex$1, { className: "block-info icon" }), jsx$2(Flex$1, { className: "block-info text", children: jsxs(Flex$1, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: [vestingTimeRemainingString(userBill), isPendingCliff && (jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsxs(Flex$1, { children: ["Bond will be claimable in", ' ', `${cliffCountdown.days !== 0 ? `${cliffCountdown.days} days` : cliffCountdown.hours !== 0 ? `${cliffCountdown.hours} hours` : `${cliffCountdown.minutes} mins`}`, "."] }), width: "180px", placement: "bottomRight", transformTip: "translate(13%, 0%)", children: jsx$2(Flex$1, { sx: { opacity: 0.6, ml: '6px' }, children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }))] }) })] })] }), jsxs(Flex$1, { className: "yourbondinfo-block row-pending", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "Pending" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.Pending }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsxs(Flex$1, { className: "yourbondinfo-block info", children: [jsx$2(Flex$1, { className: "block-info icon", children: userBill && (jsx$2(TokenImage, { symbol: (_z = (_y = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _y === void 0 ? void 0 : _y.showcaseTokenName) !== null && _z !== void 0 ? _z : (_1 = (_0 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _0 === void 0 ? void 0 : _0.earnToken) === null || _1 === void 0 ? void 0 : _1.symbol, size: 25, chain: (_2 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _2 === void 0 ? void 0 : _2.chainId })) }), jsxs(Flex$1, { className: "block-info text", children: [jsx$2(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: formatNumberSI(parseFloat(totalPending(userBill).toFixed(4)), 4) }), jsx$2(Text, { sx: {
|
|
71061
|
+
}) }), jsxs(Text, { sx: { color: 'text', opacity: '0.6', fontSize: ['12px', '12px', '12px', '16px'] }, children: ["#", userBill === null || userBill === void 0 ? void 0 : userBill.id] })] }), jsxs(Flex$1, { className: "yourbondinfo blocks-container", children: [showImage, ((_w = bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.data) === null || _w === void 0 ? void 0 : _w.deposit) && (jsxs(Flex$1, { className: "yourbondinfo-block row-vested", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "You Spent" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.YouSpent }), width: "270px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsx$2(Flex$1, { className: "yourbondinfo-block info", children: jsx$2(Flex$1, { className: "block-info text", children: jsxs(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: ["$", (_x = bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.data) === null || _x === void 0 ? void 0 : _x.dollarValue.toFixed(2)] }) }) })] })), jsxs(Flex$1, { className: "yourbondinfo-block row-vested", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "Fully Vested" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.FullyVested }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsxs(Flex$1, { className: "yourbondinfo-block info", children: [jsx$2(Flex$1, { className: "block-info icon" }), jsx$2(Flex$1, { className: "block-info text", children: jsxs(Flex$1, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: [vestingTimeRemainingString(userBill), isPendingCliff && (jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsxs(Flex$1, { children: ["Bond will be claimable in", ' ', `${cliffCountdown.days !== 0 ? `${cliffCountdown.days} days` : cliffCountdown.hours !== 0 ? `${cliffCountdown.hours} hours` : `${cliffCountdown.minutes} mins`}`, "."] }), width: "180px", placement: "bottomRight", transformTip: "translate(13%, 0%)", children: jsx$2(Flex$1, { sx: { opacity: 0.6, ml: '6px' }, children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }))] }) })] })] }), jsxs(Flex$1, { className: "yourbondinfo-block row-pending", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "Pending" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.Pending }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsxs(Flex$1, { className: "yourbondinfo-block info", children: [jsx$2(Flex$1, { className: "block-info icon", children: userBill && (jsx$2(TokenImage, { symbol: (_z = (_y = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _y === void 0 ? void 0 : _y.showcaseTokenName) !== null && _z !== void 0 ? _z : (_1 = (_0 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _0 === void 0 ? void 0 : _0.earnToken) === null || _1 === void 0 ? void 0 : _1.symbol, size: 25, chain: (_2 = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _2 === void 0 ? void 0 : _2.chainId })) }), jsxs(Flex$1, { className: "block-info text", children: [jsx$2(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: formatNumberSI(parseFloat(totalPending(userBill).toFixed(4)), 4) }), jsx$2(Text, { sx: {
|
|
71040
71062
|
fontSize: ['10px', '10px', '10px', '12px'],
|
|
71041
71063
|
fontWeight: [500, 500, 500, 400],
|
|
71042
71064
|
paddingLeft: '10px',
|
|
@@ -71148,6 +71170,16 @@ const BondInfoTooltip = ({ earnTokenContract, earnTokenSymbol, bondContract, pro
|
|
|
71148
71170
|
return (jsxs(Flex, { sx: { flexDirection: 'column', flexWrap: 'wrap' }, children: [jsx$2(ButtonsRow, { twitter: twitter, projectLink: projectLink, bubble: earnTokenContract, audit: audit, chain: chain }), (config === null || config === void 0 ? void 0 : config.referenceId) === 'apebond' && !isSoldOut && (jsx$2(Flex, { sx: { width: '100%', my: '5px', justifyContent: 'center', position: 'relative', height: '25px' }, children: jsx$2(ExpandedViewButton$1, { handleNavigation: handleProjectViewNavigation, rightPos: '-5px' }) })), jsx$2(Flex, { sx: { justifyContent: 'center' }, children: jsxs(Flex, { sx: { width: '144px', flexDirection: 'column' }, children: [jsx$2(Flex, { sx: styles$b.linkRow, children: tokenLink && (jsxs(Link, { href: tokenLink, sx: styles$b.link, target: "_blank", children: ["View Token Contract", jsx$2(Flex, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "external", color: "text", width: 10 }) })] })) }), jsx$2(Flex, { sx: styles$b.linkRow, children: bondLink && (jsxs(Link, { href: bondLink, sx: styles$b.link, target: "_blank", children: ["View Bond Contract", jsx$2(Flex, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "external", color: "text", width: 10 }) })] })) }), jsx$2(Flex, { sx: styles$b.linkRow, children: bondLink && (jsxs(Link, { href: bondDashboard, sx: styles$b.link, target: "_blank", children: ["View Bond Insights", jsx$2(Flex, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "external", color: "text", width: 10 }) })] })) })] }) })] }));
|
|
71149
71171
|
};
|
|
71150
71172
|
|
|
71173
|
+
// Minimal ABI for vesting NFT claim
|
|
71174
|
+
const VESTING_NFT_CLAIM_ABI = [
|
|
71175
|
+
{
|
|
71176
|
+
inputs: [{ internalType: 'uint256', name: 'tokenId', type: 'uint256' }],
|
|
71177
|
+
name: 'claim',
|
|
71178
|
+
outputs: [],
|
|
71179
|
+
stateMutability: 'nonpayable',
|
|
71180
|
+
type: 'function',
|
|
71181
|
+
},
|
|
71182
|
+
];
|
|
71151
71183
|
const UserBondRow = ({ bill }) => {
|
|
71152
71184
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
71153
71185
|
const userChainId = useChainId();
|
|
@@ -71161,15 +71193,17 @@ const UserBondRow = ({ bill }) => {
|
|
|
71161
71193
|
const [loadingTx, setLoadingTx] = useState(false);
|
|
71162
71194
|
const load = loadingTx || (isConfirming && !isConfirmed);
|
|
71163
71195
|
const [onOpenPurchasedBond] = useModal(jsx$2(YourBondsModal, { bill: bill }));
|
|
71196
|
+
const VESTING_NFT_ADDRESS = '0xD97197A4bC1db9e160023271B6C6de5B3325b7fd';
|
|
71164
71197
|
const handleClaim = (billId, billAddress) => __awaiter$9(void 0, void 0, void 0, function* () {
|
|
71165
71198
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
71166
71199
|
const address = billAddress;
|
|
71200
|
+
const isVestingNft = billAddress.toLowerCase() === VESTING_NFT_ADDRESS.toLowerCase();
|
|
71167
71201
|
try {
|
|
71168
71202
|
setLoadingTx(true);
|
|
71169
71203
|
const tx = yield writeContractAsync({
|
|
71170
71204
|
address: address,
|
|
71171
|
-
abi: BOND_ABI,
|
|
71172
|
-
functionName: 'redeem',
|
|
71205
|
+
abi: isVestingNft ? VESTING_NFT_CLAIM_ABI : BOND_ABI,
|
|
71206
|
+
functionName: isVestingNft ? 'claim' : 'redeem',
|
|
71173
71207
|
args: [billId],
|
|
71174
71208
|
chain: userChainId,
|
|
71175
71209
|
account,
|
|
@@ -74186,6 +74220,7 @@ const getSaleInfo = (isFake, apiAddress) => __awaiter$9(void 0, void 0, void 0,
|
|
|
74186
74220
|
nextStage: null,
|
|
74187
74221
|
isInBreakPeriod: false,
|
|
74188
74222
|
isRefundPeriod: false,
|
|
74223
|
+
isSaleEnded: false,
|
|
74189
74224
|
refundStage: null,
|
|
74190
74225
|
totalHardCap: 0,
|
|
74191
74226
|
totalBilled: 0,
|
|
@@ -74278,12 +74313,16 @@ const transformSaleData = (rawData, isFake) => {
|
|
|
74278
74313
|
// Find refund stage by key and determine if we're in refund period
|
|
74279
74314
|
const refundStage = stages.find((stage) => stage.key === 'refund') || null;
|
|
74280
74315
|
const isRefundPeriod = (_a = refundStage === null || refundStage === void 0 ? void 0 : refundStage.isActive) !== null && _a !== void 0 ? _a : false;
|
|
74316
|
+
// Determine if the sale has completely ended (TGE stage has started)
|
|
74317
|
+
const tgeStage = stages.find((stage) => stage.key === 'TGE') || null;
|
|
74318
|
+
const isSaleEnded = tgeStage ? now >= tgeStage.startTime : false;
|
|
74281
74319
|
return {
|
|
74282
74320
|
stages,
|
|
74283
74321
|
currentStage,
|
|
74284
74322
|
nextStage,
|
|
74285
74323
|
isInBreakPeriod,
|
|
74286
74324
|
isRefundPeriod,
|
|
74325
|
+
isSaleEnded,
|
|
74287
74326
|
refundStage,
|
|
74288
74327
|
totalHardCap,
|
|
74289
74328
|
totalBilled,
|
|
@@ -99988,7 +100027,7 @@ const ProgressBar = ({ saleInfo }) => {
|
|
|
99988
100027
|
});
|
|
99989
100028
|
// Determine if we're in refund or TGE period
|
|
99990
100029
|
const isRefundPeriod = (_e = saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.isRefundPeriod) !== null && _e !== void 0 ? _e : false;
|
|
99991
|
-
const isTGEPeriod = ((_f = saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.currentStage) === null || _f === void 0 ? void 0 : _f.key) === '
|
|
100030
|
+
const isTGEPeriod = ((_f = saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.currentStage) === null || _f === void 0 ? void 0 : _f.key) === 'TGE';
|
|
99992
100031
|
const endTime = useMemo(() => {
|
|
99993
100032
|
const timestamp = stage === null || stage === void 0 ? void 0 : stage.endTime;
|
|
99994
100033
|
if (!timestamp)
|
|
@@ -100055,11 +100094,7 @@ const ProgressBar = ({ saleInfo }) => {
|
|
|
100055
100094
|
color: 'var(--theme-ui-colors-textDisabledButton)',
|
|
100056
100095
|
mb: '0.2rem',
|
|
100057
100096
|
mt: '1rem',
|
|
100058
|
-
}, children: isRefundPeriod
|
|
100059
|
-
? 'Refund Period'
|
|
100060
|
-
: isTGEPeriod
|
|
100061
|
-
? 'TGE'
|
|
100062
|
-
: 'Stage ' + stageNumber + ' Progress' }), jsx$2(Text, { sx: { fontSize: '22px', fontWeight: '700' }, children: `${timeLeft}` })] })) ] }), jsx$2(Text, { sx: {
|
|
100097
|
+
}, children: isRefundPeriod ? 'Refund Period' : 'Sale' }), jsx$2(Text, { sx: { fontSize: '22px', fontWeight: '700' }, children: `${timeLeft}` })] })) ] }), jsx$2(Text, { sx: {
|
|
100063
100098
|
fontSize: '12px',
|
|
100064
100099
|
fontWeight: '400',
|
|
100065
100100
|
textAlign: 'right',
|
|
@@ -100068,7 +100103,7 @@ const ProgressBar = ({ saleInfo }) => {
|
|
|
100068
100103
|
}, children: (stage === null || stage === void 0 ? void 0 : stage.hasEnded)
|
|
100069
100104
|
? ((_g = saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.nextStage) === null || _g === void 0 ? void 0 : _g.key) === 'refund'
|
|
100070
100105
|
? 'Refund Period starts: ' + nextStageStartTime + ' UTC'
|
|
100071
|
-
: ((_h = saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.nextStage) === null || _h === void 0 ? void 0 : _h.key) === '
|
|
100106
|
+
: ((_h = saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.nextStage) === null || _h === void 0 ? void 0 : _h.key) === 'TGE'
|
|
100072
100107
|
? 'TGE starts: ' + nextStageStartTime + ' UTC'
|
|
100073
100108
|
: 'Stage ' + nextStageNumber + ' starts: ' + nextStageStartTime + ' UTC'
|
|
100074
100109
|
: isRefundPeriod
|
|
@@ -100218,7 +100253,7 @@ const YourGoo = ({ yourGoo, isLoading, isFetching, }) => {
|
|
|
100218
100253
|
textAlign: 'center',
|
|
100219
100254
|
fontWeight: 'bold',
|
|
100220
100255
|
fontSize: ['12px', '12px', '14px', '14px'],
|
|
100221
|
-
}, children: `${depositBtcTotal.toFixed(3)} BTC` })] })] })] }, key)) : (jsx$2(Flex, { sx: {
|
|
100256
|
+
}, children: `${depositBtcTotal.toFixed(3)} BTC` })] }), jsx$2(Flex, { sx: { justifyContent: 'center', mt: '20px' }, children: jsx$2(Button, { onClick: () => (window.location.href = '/bonds?yourBonds'), children: "Claim Here" }) })] })] }, key)) : (jsx$2(Flex, { sx: {
|
|
100222
100257
|
flexDirection: 'column',
|
|
100223
100258
|
width: '100%',
|
|
100224
100259
|
background: 'white2',
|
|
@@ -100792,15 +100827,24 @@ const GooSale = () => {
|
|
|
100792
100827
|
var _a;
|
|
100793
100828
|
if (saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.isRefundPeriod)
|
|
100794
100829
|
return null;
|
|
100795
|
-
if (((_a = saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.currentStage) === null || _a === void 0 ? void 0 : _a.key) === '
|
|
100830
|
+
if (((_a = saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.currentStage) === null || _a === void 0 ? void 0 : _a.key) === 'TGE')
|
|
100796
100831
|
return 'GOO Token Generation Event';
|
|
100797
100832
|
return 'Buy GOO at a discount';
|
|
100798
100833
|
}, [saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.isRefundPeriod, (_e = saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.currentStage) === null || _e === void 0 ? void 0 : _e.key]);
|
|
100799
|
-
return (jsxs(Flex, { className: "bonds-container", children: [jsx$2(CheckUrl, {}), pageTitle && (jsx$2(Flex, { sx: { justifyContent: 'center', alignItems: 'center', width: '100%' }, children: jsx$2(Text, { sx: { fontSize: '24px', fontWeight: 700, opacity: '0.9' }, children: pageTitle }) })), ((saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.isInBreakPeriod) || currentStageSoldOut) &&
|
|
100834
|
+
return (jsxs(Flex, { className: "bonds-container", children: [jsx$2(CheckUrl, {}), pageTitle && (jsx$2(Flex, { sx: { justifyContent: 'center', alignItems: 'center', width: '100%' }, children: jsx$2(Text, { sx: { fontSize: '24px', fontWeight: 700, opacity: '0.9' }, children: pageTitle }) })), ((saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.isInBreakPeriod) || currentStageSoldOut) &&
|
|
100835
|
+
(saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.nextStage) &&
|
|
100836
|
+
!isLoadingSaleInfo &&
|
|
100837
|
+
!(saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.isSaleEnded) && (jsxs(Flex, { sx: { width: '100%', justifyContent: 'center', mt: '40px', flexDirection: 'column', alignItems: 'center' }, children: [jsxs(Text, { sx: { fontSize: '20px', fontWeight: 'bold', mb: '20px' }, children: [((_f = saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.nextStage) === null || _f === void 0 ? void 0 : _f.key) === 'refund'
|
|
100800
100838
|
? 'Refund Period '
|
|
100801
|
-
: ((_g = saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.nextStage) === null || _g === void 0 ? void 0 : _g.key) === '
|
|
100839
|
+
: ((_g = saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.nextStage) === null || _g === void 0 ? void 0 : _g.key) === 'TGE'
|
|
100802
100840
|
? 'TGE '
|
|
100803
|
-
: 'Stage ' + ((_h = saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.nextStage) === null || _h === void 0 ? void 0 : _h.stageNumber) + ' ', "starts in:"] }), jsx$2(CountdownTimer, { targetTime: ((_j = saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.nextStage) === null || _j === void 0 ? void 0 : _j.startTime) || 0 }), !(((_k = saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.nextStage) === null || _k === void 0 ? void 0 : _k.key) === 'refund' || ((_l = saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.nextStage) === null || _l === void 0 ? void 0 : _l.key) === '
|
|
100841
|
+
: 'Stage ' + ((_h = saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.nextStage) === null || _h === void 0 ? void 0 : _h.stageNumber) + ' ', "starts in:"] }), jsx$2(CountdownTimer, { targetTime: ((_j = saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.nextStage) === null || _j === void 0 ? void 0 : _j.startTime) || 0 }), !(((_k = saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.nextStage) === null || _k === void 0 ? void 0 : _k.key) === 'refund' || ((_l = saleInfo === null || saleInfo === void 0 ? void 0 : saleInfo.nextStage) === null || _l === void 0 ? void 0 : _l.key) === 'TGE') ? (jsxs(Fragment$1, { children: [jsxs(Flex, { sx: { flexDirection: 'column', alignItems: 'center' }, children: [jsxs(Flex, { sx: { flexDirection: 'row', alignItems: 'center', mt: '30px' }, children: [address && (jsxs(Flex, { sx: {
|
|
100842
|
+
mr: '1rem',
|
|
100843
|
+
p: '10px',
|
|
100844
|
+
borderRadius: 'normal',
|
|
100845
|
+
background: 'white3',
|
|
100846
|
+
alignItems: 'center',
|
|
100847
|
+
}, children: [jsx$2(Flex, { sx: { mr: '10px' }, children: jsx$2(Svg, { icon: "wallet" }) }), jsxs(Text, { sx: { fontSize: '14px', fontWeight: 400 }, children: [address === null || address === void 0 ? void 0 : address.slice(0, 4), "...", address === null || address === void 0 ? void 0 : address.slice((address === null || address === void 0 ? void 0 : address.length) - 4, address === null || address === void 0 ? void 0 : address.length)] })] })), jsx$2(Flex, { sx: { fontSize: '18px', fontWeight: 500 }, children: "Are You Eligible?" })] }), !address ? (jsx$2(Flex, { sx: { my: '20px', width: '100%' }, children: jsx$2(ConnectButton, {}) })) : (whitelisted === null ||
|
|
100804
100848
|
(whitelisted === undefined && !cbBTCBalanceChecked && (jsx$2(Button, { sx: { m: '20px', width: '100%' }, onClick: handleCheckEligibility, children: "CHECK ELIGIBILITY" }))))] }), whitelisted !== null && whitelisted !== undefined && (jsxs(Flex, { sx: {
|
|
100805
100849
|
flexDirection: 'row',
|
|
100806
100850
|
alignItems: 'center',
|