@lumiapassport/ui-kit 1.6.2 → 1.6.3

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.
@@ -15,7 +15,7 @@
15
15
  <meta http-equiv="X-Content-Type-Options" content="nosniff" />
16
16
  <meta http-equiv="Referrer-Policy" content="strict-origin-when-cross-origin" />
17
17
 
18
- <title>Lumia Passport Secure Wallet - iframe version 1.6.2</title>
18
+ <title>Lumia Passport Secure Wallet - iframe version 1.6.3</title>
19
19
 
20
20
  <!-- Styles will be injected by build process -->
21
21
  <style>
@@ -2788,6 +2788,23 @@ var SigningManager = class extends TokenRefreshApiClient {
2788
2788
  const displayLogo = metadata?.logo || project.logoUrl;
2789
2789
  const fromAddress = transaction.userOpDetails?.sender;
2790
2790
  const toAddress = transaction.userOpDetails?.callTarget || transaction.to;
2791
+ const formatValue = (valueWei) => {
2792
+ try {
2793
+ const value = BigInt(valueWei);
2794
+ if (value === 0n) return "0";
2795
+ const tokens = Number(value) / 1e18;
2796
+ if (tokens >= 1) {
2797
+ return tokens.toFixed(4).replace(/\.?0+$/, "");
2798
+ } else {
2799
+ return tokens.toFixed(8).replace(/\.?0+$/, "");
2800
+ }
2801
+ } catch {
2802
+ return "0";
2803
+ }
2804
+ };
2805
+ const transactionValue = transaction.value || "0";
2806
+ const formattedValue = formatValue(transactionValue);
2807
+ const hasValue = BigInt(transactionValue) > 0n;
2791
2808
  modal.innerHTML = `
2792
2809
  <div class="modal-overlay">
2793
2810
  <div class="modal-content">
@@ -2833,6 +2850,13 @@ var SigningManager = class extends TokenRefreshApiClient {
2833
2850
  </div>
2834
2851
  ` : ""}
2835
2852
 
2853
+ ${hasValue ? `
2854
+ <div class="detail-row" style="margin-bottom: 0.5rem;">
2855
+ <span style="color: var(--iframe-text-secondary);"><strong>Amount:</strong></span>
2856
+ <strong style="color: var(--iframe-text); font-size: 1rem;">${formattedValue} LUMIA</strong>
2857
+ </div>
2858
+ ` : ""}
2859
+
2836
2860
  ${isUserOp && transaction.userOpDetails?.callData && transaction.userOpDetails.callData !== "0x" ? `
2837
2861
  <div class="detail-row" style="margin-bottom: 0.5rem;">
2838
2862
  <span style="color: var(--iframe-text-secondary);"><strong>Action:</strong></span>
@@ -3724,7 +3748,7 @@ var BackupManager = class {
3724
3748
  };
3725
3749
 
3726
3750
  // src/iframe/main.ts
3727
- var IFRAME_VERSION = "1.6.2";
3751
+ var IFRAME_VERSION = "1.6.3";
3728
3752
  var IframeWallet = class {
3729
3753
  constructor() {
3730
3754
  console.log("=".repeat(60));