@nibgate/sdk 0.2.25 → 0.2.27
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/nibgate.js +13 -14
- package/dist/nibgate.js.map +2 -2
- package/dist/nibgate.min.js +52 -52
- package/dist/nibgate.min.js.map +3 -3
- package/package.json +1 -1
- package/src/browser/default-ui.js +11 -14
package/dist/nibgate.js
CHANGED
|
@@ -27360,7 +27360,7 @@ ${prettyStateOverride(stateOverride)}`;
|
|
|
27360
27360
|
<div data-nibgate-wallet-label class="nui-mono" style="font-size:18px;color:${theme.muted};margin-bottom:40px;min-height:28px">Connect wallet</div>
|
|
27361
27361
|
<div data-nibgate-unlock-wrap style="width:100%;position:relative;border-radius:10px;overflow:hidden;cursor:pointer">
|
|
27362
27362
|
<div data-nibgate-unlock-progress style="position:absolute;inset:0;width:0%;background:${theme.accent};opacity:0.15;border-radius:10px;transition:width .05s linear;z-index:2"></div>
|
|
27363
|
-
<button type="button" data-nibgate-unlock disabled style="width:100%;padding:14px 0;font-size:17px;font-weight:
|
|
27363
|
+
<button type="button" data-nibgate-unlock disabled style="width:100%;padding:14px 0;font-size:17px;font-weight:600;line-height:1;border:0;border-radius:10px;outline:none;cursor:pointer;position:relative;z-index:4;color:#fff;background:${theme.accent};transition:box-shadow .3s,transform .3s;font-family:inherit;display:flex;align-items:center;justify-content:center">${unlockSVG}Hold to pay</button></div>
|
|
27364
27364
|
<div class="nui-stat" style="text-align:center;margin-top:16px" data-nibgate-status></div>
|
|
27365
27365
|
</div>
|
|
27366
27366
|
<div data-nibgate-premium hidden style="margin-top:32px;border-top:1px solid ${theme.border};padding-top:32px">${options.premiumContentHTML || ""}</div>
|
|
@@ -27505,20 +27505,19 @@ ${prettyStateOverride(stateOverride)}`;
|
|
|
27505
27505
|
document.removeEventListener("touchend", cancelHold);
|
|
27506
27506
|
};
|
|
27507
27507
|
card.addEventListener("remove", cleanup);
|
|
27508
|
-
const ARC_RPC = "https://arc-testnet.drpc.org";
|
|
27509
|
-
const GATEWAY_WALLET = "0x0077777d7EBA4688BDeF3E311b846F25870A19B9";
|
|
27510
|
-
const USDC_ADDRESS = "0x3600000000000000000000000000000000000000";
|
|
27511
27508
|
async function fetchBalance(addr) {
|
|
27512
|
-
|
|
27513
|
-
|
|
27514
|
-
|
|
27515
|
-
|
|
27516
|
-
|
|
27517
|
-
|
|
27518
|
-
|
|
27519
|
-
|
|
27520
|
-
|
|
27521
|
-
|
|
27509
|
+
try {
|
|
27510
|
+
const sel = "0xdd62e1c6";
|
|
27511
|
+
const pad4 = (a) => "000000000000000000000000" + a.slice(2).toLowerCase();
|
|
27512
|
+
const data = sel + pad4("0x3600000000000000000000000000000000000000") + pad4(addr);
|
|
27513
|
+
const hex = await window.ethereum.request({
|
|
27514
|
+
method: "eth_call",
|
|
27515
|
+
params: [{ to: "0x0077777d7EBA4688BDeF3E311b846F25870A19B9", data }, "latest"]
|
|
27516
|
+
});
|
|
27517
|
+
return hex && hex !== "0x" ? (Number(BigInt(hex)) / 1e6).toFixed(2) + " USDC" : "0.00 USDC";
|
|
27518
|
+
} catch {
|
|
27519
|
+
return "\u2014";
|
|
27520
|
+
}
|
|
27522
27521
|
}
|
|
27523
27522
|
let balEl = null, gwOverlay = null, balTimer = null;
|
|
27524
27523
|
function depIcon() {
|