@depay/widgets 6.9.2 → 6.10.0
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 +21 -0
- package/dist/esm/index.bundle.js +1100 -594
- package/dist/esm/index.js +9 -5
- package/dist/umd/index.bundle.js +1100 -594
- package/dist/umd/index.js +9 -5
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -174,6 +174,27 @@ DePayWidgets.Payment({
|
|
|
174
174
|
|
|
175
175
|
Checkout [DePay Web3 Payments](https://github.com/DePayFi/depay-web3-payments#pay-into-smart-contracts) and [DePay Router Smart Contract](https://github.com/DePayFi/depay-evm-router) for more details.
|
|
176
176
|
|
|
177
|
+
#### fee
|
|
178
|
+
|
|
179
|
+
You can configure a fee which will be applied to every payment with it's own dedicated fee receiver address.
|
|
180
|
+
|
|
181
|
+
The fee will be taken from the target token and target amount (after swap, depending on your `accept` configuration).
|
|
182
|
+
|
|
183
|
+
`amount`: Either percentage (e.g. `5%`, or absolute amount as BigNumber string ('100000000000000000') or pure number (2.5)
|
|
184
|
+
|
|
185
|
+
`receiver`: The address that is supposed to receive the fee.
|
|
186
|
+
|
|
187
|
+
```javascript
|
|
188
|
+
DePayWidgets.Payment({
|
|
189
|
+
accept: [...],
|
|
190
|
+
fee: {
|
|
191
|
+
amount: '3%',
|
|
192
|
+
receiver: '0x4e260bB2b25EC6F3A59B478fCDe5eD5B8D783B02'
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
|
|
177
198
|
#### track
|
|
178
199
|
|
|
179
200
|
`track`
|