@seams/wallet 0.21.0 → 0.22.0

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.
Files changed (92) hide show
  1. package/dist/.build-inputs.sha256 +1 -1
  2. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/TransactionReceipt.js +107 -43
  3. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/mountConfirmationSurface.js +1 -1
  4. package/dist/esm/core/signingEngine/uiConfirm/ui/transaction-receipt.js +36 -6
  5. package/dist/esm/core/ui/messages.js +9 -14
  6. package/dist/esm/react/components/AccountMenuButton/ProfileDropdown.js +23 -9
  7. package/dist/esm/react/components/AccountMenuButton/TransactionSettingsSection.css +376 -84
  8. package/dist/esm/react/components/AccountMenuButton/TransactionSettingsSection.js +87 -167
  9. package/dist/esm/react/components/AccountMenuButton/WalletRegionSection.js +11 -9
  10. package/dist/esm/react/components/AccountMenuButton/WalletSettingsLayout.css +76 -74
  11. package/dist/esm/react/components/AccountMenuButton/WalletSettingsLayout.js +23 -22
  12. package/dist/esm/react/components/AccountMenuButton/Web3AuthProfileButton.css +1 -5
  13. package/dist/esm/react/components/AccountMenuButton/icons/MapPinIcon.js +12 -0
  14. package/dist/esm/react/components/AccountMenuButton/index.js +2 -1
  15. package/dist/esm/react/styles/styles.css +452 -162
  16. package/dist/{public/sdk/ConfirmationDrawer-B7RCp58z.js → esm/sdk/ConfirmationDrawer-Ck33ZmU-.js} +1 -1
  17. package/dist/esm/sdk/adapters-CgJpSAxH.js +2 -0
  18. package/dist/esm/sdk/appearance-token-vars-BA3KQyEE.js +2 -0
  19. package/dist/esm/sdk/{export-viewer-host-CVdpEuY6.js → export-viewer-host-C9n-62Pi.js} +1 -1
  20. package/dist/esm/sdk/{exportKeypairOperation-gVCqLrDl.js → exportKeypairOperation-Du9HKB8f.js} +1 -1
  21. package/dist/esm/sdk/{host-Bz7mRJPZ.js → host-DoftJdVQ.js} +1 -1
  22. package/dist/esm/sdk/{localOnly-TXaYAZj-.js → localOnly-CvFSZFUy.js} +1 -1
  23. package/dist/esm/sdk/{mountExportPrivateKeySurface-DUnKOBQr.js → mountExportPrivateKeySurface-DdJHWwqY.js} +1 -1
  24. package/dist/esm/sdk/{mountRecoveryCodeBackupSurface-MGTl6FhG.js → mountRecoveryCodeBackupSurface-D3QFgMGE.js} +1 -1
  25. package/dist/{public/sdk/pendingWalletRecoveryCodeBackup-DWeemdJv.js → esm/sdk/pendingWalletRecoveryCodeBackup-LbstFwcY.js} +1 -1
  26. package/dist/esm/sdk/{registration-DVX_lnP7.js → registration-CIxJvbTo.js} +1 -1
  27. package/dist/esm/sdk/{registration-DeCUrUR9.js → registration-CeOmKyCG.js} +1 -1
  28. package/dist/esm/sdk/{runtime-auth-BAGyfscG.js → runtime-auth-C0V-5znH.js} +1 -1
  29. package/dist/{public/sdk/runtime-device-link-DKkMLVor.js → esm/sdk/runtime-device-link-B1jpHQSF.js} +1 -1
  30. package/dist/{public/sdk/runtime-ecdsa-tempo-0TAVH1xg.js → esm/sdk/runtime-ecdsa-tempo-CDSZ3pxS.js} +1 -1
  31. package/dist/esm/sdk/{runtime-email-otp-DoHa8Hif.js → runtime-email-otp-DXuxFOjL.js} +1 -1
  32. package/dist/esm/sdk/{runtime-export-CAt17IFH.js → runtime-export-Ba12ChDI.js} +1 -1
  33. package/dist/esm/sdk/{runtime-near-BQX9Jk9Z.js → runtime-near-DRrdWzmr.js} +1 -1
  34. package/dist/esm/sdk/{runtime-preferences-BuKTIpv6.js → runtime-preferences-BWyhRaBA.js} +1 -1
  35. package/dist/esm/sdk/{runtime-recovery-DyxJKKNw.js → runtime-recovery-DlJlaZlf.js} +1 -1
  36. package/dist/esm/sdk/{runtime-recovery-codes-CWmt0FDB.js → runtime-recovery-codes-CuqYWqK7.js} +1 -1
  37. package/dist/esm/sdk/{shared-BVps1f3F.js → shared-B95wnpoD.js} +1 -1
  38. package/dist/esm/sdk/transaction-activity-CpDMkSPm.js +1 -0
  39. package/dist/esm/sdk/tx-confirm-ui.js +186 -71
  40. package/dist/esm/sdk/wallet-iframe-host-ecdsa.js +1 -1
  41. package/dist/esm/sdk/wallet-iframe-host-full.js +1 -1
  42. package/dist/esm/sdk/wallet-iframe-host-near.js +1 -1
  43. package/dist/esm/sdk/wallet-iframe-host-runtime.js +1 -1
  44. package/dist/esm/sdk/wallet-ui.css +1 -1
  45. package/dist/{public/sdk/walletRecoveryAdminProof-CIoLawfC.js → esm/sdk/walletRecoveryAdminProof-CtH8_lph.js} +1 -1
  46. package/dist/public/headers.manifest.json +1 -1
  47. package/dist/{esm/sdk/ConfirmationDrawer-B7RCp58z.js → public/sdk/ConfirmationDrawer-Ck33ZmU-.js} +1 -1
  48. package/dist/public/sdk/adapters-CgJpSAxH.js +2 -0
  49. package/dist/public/sdk/appearance-token-vars-BA3KQyEE.js +2 -0
  50. package/dist/public/sdk/{export-viewer-host-CVdpEuY6.js → export-viewer-host-C9n-62Pi.js} +1 -1
  51. package/dist/public/sdk/{exportKeypairOperation-gVCqLrDl.js → exportKeypairOperation-Du9HKB8f.js} +1 -1
  52. package/dist/public/sdk/{host-Bz7mRJPZ.js → host-DoftJdVQ.js} +1 -1
  53. package/dist/public/sdk/{localOnly-TXaYAZj-.js → localOnly-CvFSZFUy.js} +1 -1
  54. package/dist/public/sdk/{mountExportPrivateKeySurface-DUnKOBQr.js → mountExportPrivateKeySurface-DdJHWwqY.js} +1 -1
  55. package/dist/public/sdk/{mountRecoveryCodeBackupSurface-MGTl6FhG.js → mountRecoveryCodeBackupSurface-D3QFgMGE.js} +1 -1
  56. package/dist/{esm/sdk/pendingWalletRecoveryCodeBackup-DWeemdJv.js → public/sdk/pendingWalletRecoveryCodeBackup-LbstFwcY.js} +1 -1
  57. package/dist/public/sdk/{registration-DVX_lnP7.js → registration-CIxJvbTo.js} +1 -1
  58. package/dist/public/sdk/{registration-DeCUrUR9.js → registration-CeOmKyCG.js} +1 -1
  59. package/dist/public/sdk/{runtime-auth-BAGyfscG.js → runtime-auth-C0V-5znH.js} +1 -1
  60. package/dist/{esm/sdk/runtime-device-link-DKkMLVor.js → public/sdk/runtime-device-link-B1jpHQSF.js} +1 -1
  61. package/dist/{esm/sdk/runtime-ecdsa-tempo-0TAVH1xg.js → public/sdk/runtime-ecdsa-tempo-CDSZ3pxS.js} +1 -1
  62. package/dist/public/sdk/{runtime-email-otp-DoHa8Hif.js → runtime-email-otp-DXuxFOjL.js} +1 -1
  63. package/dist/public/sdk/{runtime-export-CAt17IFH.js → runtime-export-Ba12ChDI.js} +1 -1
  64. package/dist/public/sdk/{runtime-near-BQX9Jk9Z.js → runtime-near-DRrdWzmr.js} +1 -1
  65. package/dist/public/sdk/{runtime-preferences-BuKTIpv6.js → runtime-preferences-BWyhRaBA.js} +1 -1
  66. package/dist/public/sdk/{runtime-recovery-DyxJKKNw.js → runtime-recovery-DlJlaZlf.js} +1 -1
  67. package/dist/public/sdk/{runtime-recovery-codes-CWmt0FDB.js → runtime-recovery-codes-CuqYWqK7.js} +1 -1
  68. package/dist/public/sdk/{shared-BVps1f3F.js → shared-B95wnpoD.js} +1 -1
  69. package/dist/public/sdk/transaction-activity-CpDMkSPm.js +1 -0
  70. package/dist/public/sdk/tx-confirm-ui.js +186 -71
  71. package/dist/public/sdk/wallet-iframe-host-ecdsa.js +1 -1
  72. package/dist/public/sdk/wallet-iframe-host-full.js +1 -1
  73. package/dist/public/sdk/wallet-iframe-host-near.js +1 -1
  74. package/dist/public/sdk/wallet-iframe-host-runtime.js +1 -1
  75. package/dist/public/sdk/wallet-ui.css +1 -1
  76. package/dist/{esm/sdk/walletRecoveryAdminProof-CIoLawfC.js → public/sdk/walletRecoveryAdminProof-CtH8_lph.js} +1 -1
  77. package/dist/public/wallet-assets.manifest.json +50 -50
  78. package/dist/public/wallet-service/index.html +4 -4
  79. package/dist/types/wallet/src/SeamsWeb/walletIframe/host/auth-menu/controller.d.ts +2 -0
  80. package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/transaction-activity.d.ts +2 -2
  81. package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/transaction-receipt.d.ts +25 -6
  82. package/dist/types/wallet/src/core/ui/messages.d.ts +1 -1
  83. package/dist/types/wallet/src/react/components/AccountMenuButton/icons/MapPinIcon.d.ts +2 -0
  84. package/package.json +1 -1
  85. package/dist/esm/react/components/AccountMenuButton/SegmentedControl.js +0 -77
  86. package/dist/esm/sdk/adapters-La60hveX.js +0 -2
  87. package/dist/esm/sdk/appearance-token-vars-Bu6YUWmf.js +0 -2
  88. package/dist/esm/sdk/transaction-activity-D5f-Yn9t.js +0 -1
  89. package/dist/public/sdk/adapters-La60hveX.js +0 -2
  90. package/dist/public/sdk/appearance-token-vars-Bu6YUWmf.js +0 -2
  91. package/dist/public/sdk/transaction-activity-D5f-Yn9t.js +0 -1
  92. package/dist/types/wallet/src/react/components/AccountMenuButton/SegmentedControl.d.ts +0 -25
@@ -1 +1 @@
1
- 30350f07c50b9a4d643fd64c4b936f107eb267955a5f2c78561529108cbdabc5
1
+ 457a3a44df7bb82ea046daa003a51f06837f317a1ab7bbe92293931ea7e74773
@@ -1,10 +1,10 @@
1
1
  import { walletDisplayText, walletText } from "../../../../ui/messages.js";
2
- import { WalletLocaleContext, WalletText } from "./WalletLocale.js";
2
+ import { WalletLocaleContext, WalletText, useWalletLocale } from "./WalletLocale.js";
3
3
  import { announceClampedSurfaceResize } from "../confirm-surface-resize.js";
4
4
  import { confirmationDocumentStyles } from "./confirmation-styles.js";
5
5
  import { ReviewDisclosure } from "./ReviewDisclosure.js";
6
6
  import { CopyReviewValue, ReviewAmount, ReviewIcon, ReviewMiddleTruncated, WalletReceiptFooter, reviewNetwork, reviewRecipient } from "./TransactionReview.js";
7
- import { receiptCompletedStages, receiptDescription, receiptHeading, receiptIsPending } from "../transaction-receipt.js";
7
+ import { receiptCompletedStages, receiptDescription, receiptHeading, receiptIsComplete, receiptIsPending, receiptTitle } from "../transaction-receipt.js";
8
8
  import { Component, createRef } from "preact";
9
9
  import { Fragment as Fragment$1, jsx, jsxs } from "preact/jsx-runtime";
10
10
  //#region src/core/signingEngine/uiConfirm/ui/preact/TransactionReceipt.tsx
@@ -23,12 +23,12 @@ var TransactionReceipt = class extends Component {
23
23
  this.props.receipt.onView("expanded");
24
24
  };
25
25
  close = () => {
26
- if (receiptIsPending(this.props.receipt.state)) this.minimize();
26
+ if (receiptIsPending(this.props.receipt)) this.minimize();
27
27
  else this.props.receipt.onDismiss();
28
28
  };
29
29
  componentDidUpdate(previous) {
30
30
  const { receipt } = this.props;
31
- if (receipt.view === "expanded" && previous.receipt.view === "expanded" && receipt.state.kind === "confirmed" && previous.receipt.state.kind !== "confirmed") this.revealExplorerLink();
31
+ if (receipt.view === "expanded" && previous.receipt.view === "expanded" && receipt.subject === "transaction" && receipt.state.kind === "confirmed" && previous.receipt.state.kind !== "confirmed") this.revealExplorerLink();
32
32
  }
33
33
  componentWillUnmount() {
34
34
  this.releaseExplorerRow();
@@ -85,12 +85,13 @@ var TransactionReceipt = class extends Component {
85
85
  }
86
86
  render() {
87
87
  const { receipt, data } = this.props;
88
- const heading = receiptHeading(receipt.state);
89
- const complete = receipt.state.kind === "confirmed" || receipt.state.kind === "signed";
90
- const pending = receiptIsPending(receipt.state);
91
- const completedStages = receiptCompletedStages(receipt.state);
88
+ const heading = receiptHeading(receipt);
89
+ const complete = receiptIsComplete(receipt);
90
+ const pending = receiptIsPending(receipt);
91
+ const completedStages = receiptCompletedStages(receipt);
92
92
  const recipient = reviewRecipient(data.model);
93
- const explorerHref = receipt.state.kind === "confirmed" && receipt.state.hash ? transactionExplorerHref(data.model, this.props.explorers, receipt.state.hash) : null;
93
+ const transaction = receipt.subject === "transaction" ? receipt.state : null;
94
+ const explorerHref = transaction?.kind === "confirmed" && transaction.hash ? transactionExplorerHref(data.model, this.props.explorers, transaction.hash) : null;
94
95
  if (receipt.view === "toast") return /* @__PURE__ */ jsxs("div", {
95
96
  class: "seams-transaction-toast",
96
97
  "data-completed-stages": completedStages,
@@ -141,7 +142,7 @@ var TransactionReceipt = class extends Component {
141
142
  children: [
142
143
  /* @__PURE__ */ jsxs("div", {
143
144
  class: "seams-review-toolbar",
144
- children: [/* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(WalletText, { message: "Transaction receipt" }) }), /* @__PURE__ */ jsx("button", {
145
+ children: [/* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(WalletText, { copy: receiptTitle(receipt) }) }), /* @__PURE__ */ jsx("button", {
145
146
  type: "button",
146
147
  "aria-label": walletText(this.context, "Minimize transaction"),
147
148
  onClick: this.minimize,
@@ -157,7 +158,7 @@ var TransactionReceipt = class extends Component {
157
158
  }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h2", {
158
159
  role: "status",
159
160
  children: /* @__PURE__ */ jsx(WalletText, { copy: heading })
160
- }), /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx(WalletText, { copy: receiptDescription(receipt.state) }) })] })]
161
+ }), /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx(WalletText, { copy: receiptDescription(receipt) }) })] })]
161
162
  }),
162
163
  /* @__PURE__ */ jsx(ReviewAmount, {
163
164
  model: data.model,
@@ -183,39 +184,13 @@ var TransactionReceipt = class extends Component {
183
184
  data.model.totals.feeSymbol
184
185
  ] })] })
185
186
  }),
186
- /* @__PURE__ */ jsxs("div", {
187
- class: "seams-receipt-steps",
188
- "aria-label": walletText(this.context, "Transaction progress"),
189
- children: [
190
- /* @__PURE__ */ jsx(ReceiptStep, {
191
- stage: "signing",
192
- label: walletText(this.context, "Signed"),
193
- activeLabel: "Signing",
194
- complete: completedStages >= 1,
195
- active: receipt.state.kind === "signing"
196
- }),
197
- /* @__PURE__ */ jsx(ReceiptStep, {
198
- stage: "broadcast",
199
- label: walletText(this.context, "Broadcast"),
200
- activeLabel: "Broadcasting",
201
- complete: completedStages >= 2,
202
- active: receipt.state.kind === "broadcasting"
203
- }),
204
- /* @__PURE__ */ jsx(ReceiptStep, {
205
- stage: "confirming",
206
- label: walletDisplayText(this.context, receipt.state.kind === "reverted" ? "Reverted" : "Confirmed"),
207
- activeLabel: "Confirming",
208
- complete: completedStages === 3,
209
- active: receipt.state.kind === "submitted"
210
- })
211
- ]
212
- }),
187
+ transaction ? /* @__PURE__ */ jsx(ReceiptSteps, { state: transaction }) : receipt.subject === "message" && /* @__PURE__ */ jsx(MessageReceiptSteps, { state: receipt.state }),
213
188
  /* @__PURE__ */ jsx(ReviewDisclosure, {
214
189
  label: walletText(this.context, "Receipt details"),
215
190
  children: /* @__PURE__ */ jsxs("dl", {
216
191
  class: "seams-review-fields",
217
192
  children: [
218
- data.model?.signerAccount && /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", { children: /* @__PURE__ */ jsx(WalletText, { message: "From" }) }), /* @__PURE__ */ jsx("dd", {
193
+ transaction && data.model?.signerAccount && /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", { children: /* @__PURE__ */ jsx(WalletText, { message: "From" }) }), /* @__PURE__ */ jsx("dd", {
219
194
  class: "seams-review-recipient",
220
195
  children: /* @__PURE__ */ jsx(CopyReviewValue, {
221
196
  value: data.model.signerAccount,
@@ -231,10 +206,11 @@ var TransactionReceipt = class extends Component {
231
206
  label: walletDisplayText(this.context, `Copy recipient address ${recipient}`)
232
207
  })
233
208
  })] }),
234
- receipt.state.hash && /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", { children: /* @__PURE__ */ jsx(WalletText, { message: "Transaction" }) }), /* @__PURE__ */ jsxs("dd", { children: [/* @__PURE__ */ jsx(ReviewMiddleTruncated, {
235
- value: receipt.state.hash,
209
+ transaction?.hash && /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", { children: /* @__PURE__ */ jsx(WalletText, { message: "Transaction" }) }), /* @__PURE__ */ jsxs("dd", { children: [/* @__PURE__ */ jsx(ReviewMiddleTruncated, {
210
+ value: transaction.hash,
236
211
  class: "seams-review-hash"
237
- }), /* @__PURE__ */ jsx(CopyReviewValue, { value: receipt.state.hash })] })] }),
212
+ }), /* @__PURE__ */ jsx(CopyReviewValue, { value: transaction.hash })] })] }),
213
+ receipt.subject === "message" && /* @__PURE__ */ jsx(MessageReceiptFields, { model: data.model }),
238
214
  /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", { children: /* @__PURE__ */ jsx(WalletText, { message: "Status" }) }), /* @__PURE__ */ jsx("dd", { children: /* @__PURE__ */ jsx(WalletText, { copy: heading }) })] })
239
215
  ]
240
216
  })
@@ -243,7 +219,7 @@ var TransactionReceipt = class extends Component {
243
219
  type: "button",
244
220
  class: "seams-receipt-primary",
245
221
  onClick: this.close,
246
- children: receiptIsPending(receipt.state) ? /* @__PURE__ */ jsx(WalletText, { message: "Continue in background" }) : /* @__PURE__ */ jsx(WalletText, { message: "Done" })
222
+ children: pending ? /* @__PURE__ */ jsx(WalletText, { message: "Continue in background" }) : /* @__PURE__ */ jsx(WalletText, { message: "Done" })
247
223
  }),
248
224
  explorerHref && /* @__PURE__ */ jsx("div", {
249
225
  id: this.explorerRowId,
@@ -289,6 +265,94 @@ function transactionExplorerHref(model, explorers, hash) {
289
265
  function assertNeverDisplayChain(chain) {
290
266
  throw new Error(`Unexpected display chain: ${String(chain)}`);
291
267
  }
268
+ function ReceiptSteps({ state }) {
269
+ const locale = useWalletLocale();
270
+ const completedStages = receiptCompletedStages({
271
+ subject: "transaction",
272
+ state
273
+ });
274
+ return /* @__PURE__ */ jsxs("div", {
275
+ class: "seams-receipt-steps",
276
+ "aria-label": walletText(locale, "Transaction progress"),
277
+ children: [
278
+ /* @__PURE__ */ jsx(ReceiptStep, {
279
+ stage: "signing",
280
+ label: walletText(locale, "Signed"),
281
+ activeLabel: "Signing",
282
+ complete: completedStages >= 1,
283
+ active: state.kind === "signing"
284
+ }),
285
+ /* @__PURE__ */ jsx(ReceiptStep, {
286
+ stage: "broadcast",
287
+ label: walletText(locale, "Broadcast"),
288
+ activeLabel: "Broadcasting",
289
+ complete: completedStages >= 2,
290
+ active: state.kind === "broadcasting"
291
+ }),
292
+ /* @__PURE__ */ jsx(ReceiptStep, {
293
+ stage: "confirming",
294
+ label: walletDisplayText(locale, state.kind === "reverted" ? "Reverted" : "Confirmed"),
295
+ activeLabel: "Confirming",
296
+ complete: completedStages === 3,
297
+ active: state.kind === "submitted"
298
+ })
299
+ ]
300
+ });
301
+ }
302
+ /**
303
+ * A message signature has one stage. It keeps the transaction's three tracks, so
304
+ * the receipt has the same height, and fills them all once signed. Only the first
305
+ * track has a label: there is no broadcast or confirmation.
306
+ */
307
+ function MessageReceiptSteps({ state }) {
308
+ const locale = useWalletLocale();
309
+ const complete = state.kind === "signed";
310
+ const active = state.kind === "signing";
311
+ return /* @__PURE__ */ jsxs("div", {
312
+ class: "seams-receipt-steps",
313
+ "aria-label": walletText(locale, "Transaction progress"),
314
+ children: [
315
+ /* @__PURE__ */ jsx(ReceiptStep, {
316
+ stage: "signing",
317
+ label: walletText(locale, "Signed"),
318
+ activeLabel: "Signing",
319
+ complete,
320
+ active
321
+ }),
322
+ /* @__PURE__ */ jsx(ReceiptStep, {
323
+ stage: "signed",
324
+ label: "",
325
+ activeLabel: "",
326
+ complete,
327
+ active: false
328
+ }),
329
+ /* @__PURE__ */ jsx(ReceiptStep, {
330
+ stage: "signed",
331
+ label: "",
332
+ activeLabel: "",
333
+ complete,
334
+ active: false
335
+ })
336
+ ]
337
+ });
338
+ }
339
+ /** The signed message's own fields: signer, recipient and message text. */
340
+ function MessageReceiptFields({ model }) {
341
+ const locale = useWalletLocale();
342
+ const operation = model?.operations.length === 1 ? model.operations[0] : null;
343
+ if (operation?.kind !== "near.message") return null;
344
+ return /* @__PURE__ */ jsx(Fragment$1, { children: operation.fields?.map((field) => /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", { children: /* @__PURE__ */ jsx(WalletText, { copy: field.label }) }), field.renderAs === "file-content" ? /* @__PURE__ */ jsxs("dd", { children: [/* @__PURE__ */ jsx("span", {
345
+ class: "seams-receipt-message",
346
+ children: field.value
347
+ }), /* @__PURE__ */ jsx(CopyReviewValue, { value: field.copyValue ?? field.value })] }) : /* @__PURE__ */ jsx("dd", {
348
+ class: "seams-review-recipient",
349
+ children: /* @__PURE__ */ jsx(CopyReviewValue, {
350
+ value: field.copyValue ?? field.value,
351
+ address: true,
352
+ label: walletDisplayText(locale, `Copy ${field.label.toLowerCase()} address ${field.value}`)
353
+ })
354
+ })] }, field.label)) });
355
+ }
292
356
  function ReceiptStep(props) {
293
357
  const state = props.complete ? "complete" : props.active ? "active" : "waiting";
294
358
  return /* @__PURE__ */ jsxs("span", {
@@ -191,7 +191,7 @@ var MountedConfirmationSurface = class {
191
191
  cancel = () => {
192
192
  if (this.state.kind !== "mounted") return;
193
193
  if (this.receipt) {
194
- if (receiptIsPending(this.receipt.state)) this.receipt.onView("toast");
194
+ if (receiptIsPending(this.receipt)) this.receipt.onView("toast");
195
195
  else this.receipt.onDismiss();
196
196
  return;
197
197
  }
@@ -1,8 +1,15 @@
1
1
  //#region src/core/signingEngine/uiConfirm/ui/transaction-receipt.ts
2
- function receiptIsPending(state) {
3
- return state.kind === "signing" || state.kind === "broadcasting" || state.kind === "submitted";
2
+ function receiptIsPending(receipt) {
3
+ const { kind } = receipt.state;
4
+ return kind === "signing" || kind === "broadcasting" || kind === "submitted";
4
5
  }
5
- function receiptCompletedStages(state) {
6
+ function receiptIsComplete(receipt) {
7
+ return receipt.state.kind === "confirmed" || receipt.state.kind === "signed";
8
+ }
9
+ /** A message signature has one stage, so its toast fills at once when signed. */
10
+ function receiptCompletedStages(receipt) {
11
+ if (receipt.subject === "message") return receipt.state.kind === "signed" ? 3 : 0;
12
+ const { state } = receipt;
6
13
  switch (state.kind) {
7
14
  case "signing": return 0;
8
15
  case "signed":
@@ -15,7 +22,12 @@ function receiptCompletedStages(state) {
15
22
  default: return assertNever(state);
16
23
  }
17
24
  }
18
- function receiptHeading(state) {
25
+ function receiptTitle(receipt) {
26
+ return receipt.subject === "message" ? "Message signature" : "Transaction receipt";
27
+ }
28
+ function receiptHeading(receipt) {
29
+ if (receipt.subject === "message") return messageHeading(receipt.state);
30
+ const { state } = receipt;
19
31
  switch (state.kind) {
20
32
  case "signing": return "Signing transaction";
21
33
  case "signed": return "Signature ready";
@@ -28,7 +40,9 @@ function receiptHeading(state) {
28
40
  default: return assertNever(state);
29
41
  }
30
42
  }
31
- function receiptDescription(state) {
43
+ function receiptDescription(receipt) {
44
+ if (receipt.subject === "message") return messageDescription(receipt.state);
45
+ const { state } = receipt;
32
46
  switch (state.kind) {
33
47
  case "signing": return "Preparing your signed transaction.";
34
48
  case "signed": return "Signature created, ready to broadcast.";
@@ -41,10 +55,26 @@ function receiptDescription(state) {
41
55
  default: return assertNever(state);
42
56
  }
43
57
  }
58
+ function messageHeading(state) {
59
+ switch (state.kind) {
60
+ case "signing": return "Signing message";
61
+ case "signed": return "Message signed";
62
+ case "failed": return "Signature failed";
63
+ default: return assertNever(state);
64
+ }
65
+ }
66
+ function messageDescription(state) {
67
+ switch (state.kind) {
68
+ case "signing": return "Preparing your message signature.";
69
+ case "signed": return "Signed off-chain. Nothing was sent to the network.";
70
+ case "failed": return state.message;
71
+ default: return assertNever(state);
72
+ }
73
+ }
44
74
  function assertNever(value) {
45
75
  throw new Error(`Unexpected transaction receipt state: ${String(value)}`);
46
76
  }
47
77
  //#endregion
48
- export { receiptCompletedStages, receiptDescription, receiptHeading, receiptIsPending };
78
+ export { receiptCompletedStages, receiptDescription, receiptHeading, receiptIsComplete, receiptIsPending, receiptTitle };
49
79
 
50
80
  //# sourceMappingURL=transaction-receipt.js.map
@@ -113,27 +113,18 @@ const walletMessages = [
113
113
  ["Yes, remove", "削除する"],
114
114
  ["Removing…", "削除中…"],
115
115
  ["Review appearance", "確認画面の表示"],
116
+ ["Review before signing", "署名前に確認"],
117
+ ["Show the transaction details, then click Continue to sign.", "トランザクションの詳細を表示し、「続ける」をクリックして署名します。"],
118
+ ["Passkey authentication starts as soon as the details appear.", "詳細が表示されると同時にパスキー認証を開始します。"],
119
+ ["On phones, in Safari and for Email OTP sign-in, the wallet always waits for Continue.", "スマートフォン、Safari、メールOTPでのサインインでは、常に「続ける」のクリックを待ちます。"],
116
120
  ["Choose where transaction details appear before signing.", "署名前にトランザクションの詳細を表示する場所を選択してください。"],
117
- ["Confirmation step", "確認操作"],
118
- ["Choose Modal or Drawer to configure the confirmation step.", "確認操作を設定するには、モーダルまたはドロワーを選択してください。"],
119
- ["Choose whether to click Continue before authentication starts.", "認証開始前に「続ける」をクリックするか選択してください。"],
120
- ["Confirmer UI", "確認画面"],
121
- ["Confirmation Options", "確認オプション"],
122
- ["skip click", "クリックを省略"],
123
- ["require click", "クリックが必要"],
124
121
  ["none", "表示なし"],
125
122
  ["modal", "モーダル"],
126
123
  ["drawer", "ドロワー"],
127
- ["No review", "確認画面なし"],
128
- ["Start authentication without showing a review panel.", "確認画面を表示せずに認証を開始します。"],
129
124
  ["Modal", "モーダル"],
130
125
  ["Review the transaction in a centered dialog.", "画面中央のダイアログでトランザクションを確認します。"],
131
126
  ["Drawer", "ドロワー"],
132
127
  ["Review the transaction in a slide-out panel.", "スライド式パネルでトランザクションを確認します。"],
133
- ["Start automatically", "自動で開始"],
134
- ["Begin authentication as soon as the review opens.", "確認画面を開くと同時に認証を開始します。"],
135
- ["Click to continue", "クリックして続ける"],
136
- ["Review the details, then click Continue to start authentication.", "詳細を確認し、「続ける」をクリックして認証を開始します。"],
137
128
  ["Unable to refresh your wallet. Try again.", "ウォレットを更新できません。もう一度お試しください。"],
138
129
  ["Key export is unavailable for this wallet.", "このウォレットでは鍵をエクスポートできません。"],
139
130
  ["NEAR signer provisioning is still in progress. Try again shortly.", "NEAR 署名機能を準備中です。しばらくしてからもう一度お試しください。"],
@@ -176,7 +167,6 @@ const walletMessages = [
176
167
  ["Reveal with passkey", "パスキーで表示"],
177
168
  ["View on explorer", "エクスプローラーで表示"],
178
169
  ["This wallet", "このウォレット"],
179
- ["Addresses", "アドレス"],
180
170
  ["Security & devices", "セキュリティとデバイス"],
181
171
  ["Close wallet settings", "ウォレット設定を閉じる"],
182
172
  ["Wallet account", "ウォレットアカウント"],
@@ -213,6 +203,11 @@ const walletMessages = [
213
203
  ["Confirmation unavailable", "承認状態を取得できません"],
214
204
  ["Preparing your signed transaction.", "署名済みトランザクションを準備中です。"],
215
205
  ["Signature created, ready to broadcast.", "署名を作成しました。送信する準備ができました。"],
206
+ ["Signing message", "メッセージに署名中"],
207
+ ["Message signed", "メッセージに署名しました"],
208
+ ["Signature failed", "署名に失敗しました"],
209
+ ["Preparing your message signature.", "メッセージへの署名を準備中です。"],
210
+ ["Signed off-chain. Nothing was sent to the network.", "オフチェーンで署名しました。ネットワークには何も送信していません。"],
216
211
  ["Submitting your signed transaction to the network.", "署名済みトランザクションをネットワークに送信中です。"],
217
212
  ["Submitted to the network. Waiting for the receipt.", "ネットワークに送信しました。レシートを待機中です。"],
218
213
  ["The network confirmed your transaction.", "ネットワークがトランザクションを承認しました。"],
@@ -6,21 +6,35 @@ import "react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  import "./ProfileDropdown.css";
8
8
  //#region src/react/components/AccountMenuButton/ProfileDropdown.tsx
9
- const SECURITY_ITEMS = [
9
+ const MENU_ORDER = [
10
+ "accounts",
11
+ "transaction-settings",
10
12
  "authentication-methods",
13
+ "recovery-codes",
14
+ "linked-devices",
11
15
  "scan-link-device",
16
+ "export-keys"
17
+ ];
18
+ const SECURITY_ITEMS = [
19
+ "authentication-methods",
20
+ "recovery-codes",
12
21
  "linked-devices",
13
- "recovery-codes"
22
+ "scan-link-device",
23
+ "export-keys"
14
24
  ];
15
25
  function isSecurityItem(item) {
16
26
  return SECURITY_ITEMS.includes(item.id ?? "");
17
27
  }
18
- function compareSecurityItems(a, b) {
19
- return SECURITY_ITEMS.indexOf(a.id ?? "") - SECURITY_ITEMS.indexOf(b.id ?? "");
20
- }
21
- function isAccountItem(item) {
28
+ function isWalletItem(item) {
22
29
  return !isSecurityItem(item);
23
30
  }
31
+ function menuRank(item) {
32
+ const rank = MENU_ORDER.indexOf(item.id ?? "");
33
+ return rank === -1 ? MENU_ORDER.length : rank;
34
+ }
35
+ function compareMenuItems(a, b) {
36
+ return menuRank(a) - menuRank(b);
37
+ }
24
38
  function storeMenuRef(refs, index, element) {
25
39
  refs.current[index] = element;
26
40
  }
@@ -48,13 +62,13 @@ function ProfileDropdown(props) {
48
62
  className: "seams-profile-dropdown-menu",
49
63
  children: [
50
64
  /* @__PURE__ */ jsx(MenuGroup, {
51
- label: walletText(locale, "Addresses"),
52
- items: props.menuItems.filter(isAccountItem),
65
+ label: walletText(locale, "Wallet"),
66
+ items: props.menuItems.filter(isWalletItem).sort(compareMenuItems),
53
67
  props
54
68
  }),
55
69
  /* @__PURE__ */ jsx(MenuGroup, {
56
70
  label: walletText(locale, "Security & devices"),
57
- items: props.menuItems.filter(isSecurityItem).sort(compareSecurityItems),
71
+ items: props.menuItems.filter(isSecurityItem).sort(compareMenuItems),
58
72
  props
59
73
  }),
60
74
  /* @__PURE__ */ jsx(LockMenuItem, {