@depay/widgets 6.9.1 → 6.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.
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`
@@ -641,6 +662,17 @@ alongside values for `start`, `min` and `step`.
641
662
 
642
663
  `step`: The number by wich to increment/decremten changes to the amount.
643
664
 
665
+ `token`: Set to `true` if you want amount selection to be denominated in the token you're selling, e.g.:
666
+
667
+ ```javascript
668
+ DePayWidgets.Sale({
669
+ sell: {...},
670
+ amount: {
671
+ token: true
672
+ }
673
+ });
674
+ ```
675
+
644
676
  #### connected
645
677
 
646
678
  `connected`