@goodwidget/ai-credits-widget 0.1.12 → 0.1.14

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.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AiCreditsWidget
3
- } from "./chunk-HFKD7MN7.js";
3
+ } from "./chunk-5Z3HSQRC.js";
4
4
 
5
5
  // src/element.ts
6
6
  import { createMiniAppElement } from "@goodwidget/embed";
package/dist/index.cjs CHANGED
@@ -1038,7 +1038,10 @@ var ANTSEED_BUYER_OPERATOR_DOMAIN = {
1038
1038
  };
1039
1039
  var WITHDRAW_PRINCIPAL_TYPES = {
1040
1040
  WithdrawPrincipal: [
1041
- { name: "signer", type: "address" },
1041
+ // `buyer` is the contract's field name; the value is our signer address.
1042
+ // EIP-712 hashes field names, so renaming this to `signer` changes the
1043
+ // struct hash and the vault rejects the withdrawal with InvalidSignature().
1044
+ { name: "buyer", type: "address" },
1042
1045
  { name: "amount", type: "uint256" },
1043
1046
  { name: "recipient", type: "address" },
1044
1047
  { name: "nonce", type: "uint256" }
@@ -1074,7 +1077,7 @@ async function signWithdrawPrincipal(params) {
1074
1077
  types: WITHDRAW_PRINCIPAL_TYPES,
1075
1078
  primaryType: "WithdrawPrincipal",
1076
1079
  message: {
1077
- signer: params.signer,
1080
+ buyer: params.signer,
1078
1081
  amount: params.amountMicro,
1079
1082
  recipient: params.recipient,
1080
1083
  nonce: params.nonce
@@ -3288,6 +3291,12 @@ var import_react18 = __toESM(require("react"), 1);
3288
3291
  var import_core3 = require("@goodwidget/core");
3289
3292
  var import_ui20 = require("@goodwidget/ui");
3290
3293
 
3294
+ // package.json
3295
+ var version = "0.1.14";
3296
+
3297
+ // src/AiCreditsWidget.tsx
3298
+ var import_ui21 = require("@goodwidget/ui");
3299
+
3291
3300
  // src/useAiCreditsHistory.ts
3292
3301
  var import_react2 = require("react");
3293
3302
  var HISTORY_PAGE_SIZE = 10;
@@ -6824,7 +6833,8 @@ function AiCreditsWidget({
6824
6833
  showWalletControls
6825
6834
  }
6826
6835
  ),
6827
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ui20.ToastContainer, {})
6836
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ui20.ToastContainer, {}),
6837
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ui21.WidgetVersion, { name: "AI Credits", version })
6828
6838
  ] })
6829
6839
  }
6830
6840
  );