@goodwidget/ai-credits-widget 0.1.12 → 0.1.13

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/element.cjs CHANGED
@@ -40,6 +40,12 @@ var import_react18 = __toESM(require("react"), 1);
40
40
  var import_core3 = require("@goodwidget/core");
41
41
  var import_ui20 = require("@goodwidget/ui");
42
42
 
43
+ // package.json
44
+ var version = "0.1.13";
45
+
46
+ // src/AiCreditsWidget.tsx
47
+ var import_ui21 = require("@goodwidget/ui");
48
+
43
49
  // src/adapter.ts
44
50
  var import_react = require("react");
45
51
  var import_core2 = require("@goodwidget/core");
@@ -553,7 +559,10 @@ var ANTSEED_BUYER_OPERATOR_DOMAIN = {
553
559
  };
554
560
  var WITHDRAW_PRINCIPAL_TYPES = {
555
561
  WithdrawPrincipal: [
556
- { name: "signer", type: "address" },
562
+ // `buyer` is the contract's field name; the value is our signer address.
563
+ // EIP-712 hashes field names, so renaming this to `signer` changes the
564
+ // struct hash and the vault rejects the withdrawal with InvalidSignature().
565
+ { name: "buyer", type: "address" },
557
566
  { name: "amount", type: "uint256" },
558
567
  { name: "recipient", type: "address" },
559
568
  { name: "nonce", type: "uint256" }
@@ -589,7 +598,7 @@ async function signWithdrawPrincipal(params) {
589
598
  types: WITHDRAW_PRINCIPAL_TYPES,
590
599
  primaryType: "WithdrawPrincipal",
591
600
  message: {
592
- signer: params.signer,
601
+ buyer: params.signer,
593
602
  amount: params.amountMicro,
594
603
  recipient: params.recipient,
595
604
  nonce: params.nonce
@@ -6773,7 +6782,8 @@ function AiCreditsWidget({
6773
6782
  showWalletControls
6774
6783
  }
6775
6784
  ),
6776
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ui20.ToastContainer, {})
6785
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ui20.ToastContainer, {}),
6786
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ui21.WidgetVersion, { name: "AI Credits", version })
6777
6787
  ] })
6778
6788
  }
6779
6789
  );