@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/index.js CHANGED
@@ -27,7 +27,7 @@ import {
27
27
  totalCreditUsdFromStatus,
28
28
  usdToCredits,
29
29
  useAiCreditsAdapter
30
- } from "./chunk-HFKD7MN7.js";
30
+ } from "./chunk-5Z3HSQRC.js";
31
31
  export {
32
32
  AiCreditsWidget,
33
33
  CELO_GOODID_ADDRESS,
@@ -989,7 +989,10 @@ var ANTSEED_BUYER_OPERATOR_DOMAIN = {
989
989
  };
990
990
  var WITHDRAW_PRINCIPAL_TYPES = {
991
991
  WithdrawPrincipal: [
992
- { name: "signer", type: "address" },
992
+ // `buyer` is the contract's field name; the value is our signer address.
993
+ // EIP-712 hashes field names, so renaming this to `signer` changes the
994
+ // struct hash and the vault rejects the withdrawal with InvalidSignature().
995
+ { name: "buyer", type: "address" },
993
996
  { name: "amount", type: "uint256" },
994
997
  { name: "recipient", type: "address" },
995
998
  { name: "nonce", type: "uint256" }
@@ -1025,7 +1028,7 @@ async function signWithdrawPrincipal(params) {
1025
1028
  types: WITHDRAW_PRINCIPAL_TYPES,
1026
1029
  primaryType: "WithdrawPrincipal",
1027
1030
  message: {
1028
- signer: params.signer,
1031
+ buyer: params.signer,
1029
1032
  amount: params.amountMicro,
1030
1033
  recipient: params.recipient,
1031
1034
  nonce: params.nonce
@@ -3239,6 +3242,12 @@ var import_react18 = __toESM(require("react"), 1);
3239
3242
  var import_core3 = require("@goodwidget/core");
3240
3243
  var import_ui20 = require("@goodwidget/ui");
3241
3244
 
3245
+ // package.json
3246
+ var version = "0.1.14";
3247
+
3248
+ // src/AiCreditsWidget.tsx
3249
+ var import_ui21 = require("@goodwidget/ui");
3250
+
3242
3251
  // src/useAiCreditsHistory.ts
3243
3252
  var import_react2 = require("react");
3244
3253
  var HISTORY_PAGE_SIZE = 10;
@@ -6775,7 +6784,8 @@ function AiCreditsWidget({
6775
6784
  showWalletControls
6776
6785
  }
6777
6786
  ),
6778
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ui20.ToastContainer, {})
6787
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ui20.ToastContainer, {}),
6788
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ui21.WidgetVersion, { name: "AI Credits", version })
6779
6789
  ] })
6780
6790
  }
6781
6791
  );