Skip to content

Commit

Permalink
v12.10.1: you can either use integration or accept, but not both!
Browse files Browse the repository at this point in the history
  • Loading branch information
0xNe0x1 committed Mar 19, 2024
1 parent b175e5a commit 0ca9195
Show file tree
Hide file tree
Showing 19 changed files with 39 additions and 11 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ This will forward:

to your backend in order to receive a payment configuration for the widget.

> [!CAUTION]
> You have the option to utilize managed integrations along with the `integration` attribute for payment validations (refer to the previous section). Alternatively, if payment validations are not necessary, you may opt for basic configurations using `accept` (see next section). However, it's important to note that `integration` and `accept` cannot be used simultaneously.
### Configuration

```javascript
Expand Down
2 changes: 1 addition & 1 deletion dist/esm/index.bundle.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions dist/esm/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -29526,6 +29526,10 @@ var preflight$1 = /*#__PURE__*/function () {
if (typeof configuration.receiver === 'undefined') {
throw 'You need to set the receiver address that you want to receive the payment!';
}

if (typeof configuration.integration !== 'undefined' && typeof configuration.accept !== 'undefined') {
throw 'You can either use `integration` or `accept`, but not both!';
}
});

case 4:
Expand Down
2 changes: 1 addition & 1 deletion dist/esm/index.evm.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions dist/esm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30956,6 +30956,10 @@ var preflight$1 = /*#__PURE__*/function () {
if (typeof configuration.receiver === 'undefined') {
throw 'You need to set the receiver address that you want to receive the payment!';
}

if (typeof configuration.integration !== 'undefined' && typeof configuration.accept !== 'undefined') {
throw 'You can either use `integration` or `accept`, but not both!';
}
});

case 4:
Expand Down
2 changes: 1 addition & 1 deletion dist/esm/index.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions dist/esm/index.solana.js
Original file line number Diff line number Diff line change
Expand Up @@ -38559,6 +38559,10 @@ var preflight$1 = /*#__PURE__*/function () {
if (typeof configuration.receiver === 'undefined') {
throw 'You need to set the receiver address that you want to receive the payment!';
}

if (typeof configuration.integration !== 'undefined' && typeof configuration.accept !== 'undefined') {
throw 'You can either use `integration` or `accept`, but not both!';
}
});

case 4:
Expand Down
2 changes: 1 addition & 1 deletion dist/esm/index.solana.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/umd/index.bundle.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions dist/umd/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -29524,6 +29524,10 @@
if (typeof configuration.receiver === 'undefined') {
throw 'You need to set the receiver address that you want to receive the payment!';
}

if (typeof configuration.integration !== 'undefined' && typeof configuration.accept !== 'undefined') {
throw 'You can either use `integration` or `accept`, but not both!';
}
});

case 4:
Expand Down
2 changes: 1 addition & 1 deletion dist/umd/index.evm.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions dist/umd/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30952,6 +30952,10 @@
if (typeof configuration.receiver === 'undefined') {
throw 'You need to set the receiver address that you want to receive the payment!';
}

if (typeof configuration.integration !== 'undefined' && typeof configuration.accept !== 'undefined') {
throw 'You can either use `integration` or `accept`, but not both!';
}
});

case 4:
Expand Down
2 changes: 1 addition & 1 deletion dist/umd/index.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions dist/umd/index.solana.js
Original file line number Diff line number Diff line change
Expand Up @@ -38557,6 +38557,10 @@
if (typeof configuration.receiver === 'undefined') {
throw 'You need to set the receiver address that you want to receive the payment!';
}

if (typeof configuration.integration !== 'undefined' && typeof configuration.accept !== 'undefined') {
throw 'You can either use `integration` or `accept`, but not both!';
}
});

case 4:
Expand Down
2 changes: 1 addition & 1 deletion dist/umd/index.solana.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.evm.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/widgets-evm",
"moduleName": "DePayWidgets",
"version": "12.10.0",
"version": "12.10.1",
"description": "Web3 Payments with any token. DePay simplifies and improves Web3 Payments with the power of DeFi. Accept any token with on-the-fly conversion.",
"main": "./dist/umd/index.js",
"module": "./dist/esm/index.js",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/widgets",
"moduleName": "DePayWidgets",
"version": "12.10.0",
"version": "12.10.1",
"description": "Web3 Payments with any token. DePay simplifies and improves Web3 Payments with the power of DeFi. Accept any token with on-the-fly conversion.",
"main": "./dist/umd/index.js",
"module": "./dist/esm/index.js",
Expand Down
2 changes: 1 addition & 1 deletion package.solana.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/widgets-solana",
"moduleName": "DePayWidgets",
"version": "12.10.0",
"version": "12.10.1",
"description": "Web3 Payments with any token. DePay simplifies and improves Web3 Payments with the power of DeFi. Accept any token with on-the-fly conversion.",
"main": "./dist/umd/index.js",
"module": "./dist/esm/index.js",
Expand Down
1 change: 1 addition & 0 deletions src/Payment.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ let preflight = async({ accept, recover, integration }) => {
if(typeof configuration.token === 'undefined' && typeof configuration.fromToken === 'undefined' && typeof configuration.fromAmount === 'undefined' && typeof configuration.toToken === 'undefined') { throw('You need to set the token you want to receive as payment!') }
if(typeof configuration.token === 'undefined' && typeof configuration.fromToken !== 'undefined' && typeof configuration.fromAmount === 'undefined' && typeof configuration.toToken === 'undefined') { throw('You need to set the fromToken, fromAmount and toToken!') }
if(typeof configuration.receiver === 'undefined') { throw('You need to set the receiver address that you want to receive the payment!') }
if(typeof configuration.integration !== 'undefined' && typeof configuration.accept !== 'undefined') { throw('You can either use `integration` or `accept`, but not both!') }
})
}

Expand Down

0 comments on commit 0ca9195

Please sign in to comment.