@orbs-network/spot-ui 2.1.2 → 2.1.3

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/README.md CHANGED
@@ -198,11 +198,8 @@ try {
198
198
  outputTokenAddress: outputToken.address,
199
199
  swapperAddress: account,
200
200
  });
201
- const signature = await client.signOrder(
202
- preparedOrder,
203
- ({ signerAddress, typedData }) =>
204
- wallet.signTypedData(typedData, signerAddress),
205
- );
201
+ const { signerAddress, typedData } = preparedOrder.signingRequest;
202
+ const signature = await wallet.signTypedData(typedData, signerAddress);
206
203
  const order = await client.submitOrder(preparedOrder, signature);
207
204
  console.info("Order submitted", order);
208
205
  } catch (error) {
@@ -211,10 +208,11 @@ try {
211
208
  }
212
209
  ```
213
210
 
214
- `signOrder` only invokes the supplied wallet signer and returns its signature.
215
- It never submits the order. `submitOrder` is the separate network operation.
216
- The complete sequence is allowance check, native wrapping when required,
217
- approval when required, allowance verification, signing, and submission.
211
+ The client prepares the framework-neutral signing payload but does not interact
212
+ with the wallet. The host signs `preparedOrder.signingRequest`, then passes the
213
+ signature to `submitOrder`. The complete sequence is allowance check, native
214
+ wrapping when required, approval when required, allowance verification,
215
+ signing, and submission.
218
216
 
219
217
  `prepareOrder` does not recalculate form amounts, prices, trades, or schedules,
220
218
  and it rejects a form whose `canSubmit` value is `false`.