@phala/pay 0.11.0 → 0.11.1

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 (2) hide show
  1. package/README.md +7 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -186,8 +186,9 @@ import { PaymentElement } from "@phala/pay-react";
186
186
  - `createQuote(option, { idempotencyKey })` is called once per submit, with the very object of
187
187
  `options` the payer chose; a submit while one is pending is ignored. It resolves with
188
188
  `{ clientSecret, expectedAddress, apiBase? }`; `apiBase` falls back to the prop. A rejection
189
- shows "Could not start the payment. Try again." and calls `onError(error)`; show your own
190
- message from there.
189
+ shows "Could not start the payment. Try again." and calls `onError(error)`. To show your own
190
+ reason in that alert instead, pass `errorMessage(cause)`: a non-empty string replaces the text,
191
+ and `null` or `undefined` keeps it. It applies to `createDepositAddress` too.
191
192
  - Create the quote with `idempotencyKey` as its `Idempotency-Key`, not an order id of yours: the
192
193
  key is a new random UUID for each quote the payer asks for (another option or amount, or a new
193
194
  quote after going back from one) and the same only when they retry after `createQuote` failed
@@ -201,7 +202,10 @@ import { PaymentElement } from "@phala/pay-react";
201
202
  new payment" once credited.
202
203
  - `createDepositAddress(option)` adds "Use a deposit address", for payers sending from an exchange
203
204
  or any wallet: it resolves with the deposit address's `address` and `networks` and, to follow its
204
- payments, `clientSecret`; the element shows `<DepositAddress>` at the chosen option.
205
+ payments, `clientSecret`; the element shows `<DepositAddress>` at the chosen option. Under the
206
+ link it states the chosen option's per-transfer limits when it carries them, as a
207
+ `GET /v1/config` asset does: "Send at least $5.00 and up to 10,100 USDC per transfer on Base from
208
+ an exchange or another wallet." Without them it says the address shows its limits.
205
209
  - Your own button: pass `hideSubmit` and an `id`, and give your button `type="submit" form={id}`
206
210
  (or call `requestSubmit()` on the form with that id). The element is a `<form>`: do not nest it
207
211
  in another one.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phala/pay",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "Phala Pay framework-free browser client",
5
5
  "keywords": [
6
6
  "crypto",