@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 +7 -9
- package/dist/spot-ui.js +813 -822
- package/dist/spot-ui.umd.cjs +8 -8
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/lib/client.d.ts +0 -3
- package/dist/src/lib/client.d.ts.map +1 -1
- package/dist/src/lib/partners.d.ts.map +1 -1
- package/dist/src/lib/types.d.ts +2 -1
- package/dist/src/lib/types.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -198,11 +198,8 @@ try {
|
|
|
198
198
|
outputTokenAddress: outputToken.address,
|
|
199
199
|
swapperAddress: account,
|
|
200
200
|
});
|
|
201
|
-
const
|
|
202
|
-
|
|
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
|
-
|
|
215
|
-
|
|
216
|
-
The complete sequence is allowance check, native
|
|
217
|
-
approval when required, allowance verification,
|
|
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`.
|