Skip to content

Commit

Permalink
Adding close() function callbacks to sent and confirmed callback opti…
Browse files Browse the repository at this point in the history
…ons.
  • Loading branch information
10xSebastian committed Jun 9, 2021
1 parent b6ab2ec commit 5ba7c3d
Show file tree
Hide file tree
Showing 9 changed files with 339 additions and 323 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ The widget will call the `sent` function passing the following object as an argu
amount: '<the expected payment amount as big number string>',
token: '<the expected token address>',
from: `<the address from which the payment is sent>`,
nonce: `<the sender nonce of the transaction>`
nonce: `<the sender nonce of the transaction>`,
close: '<a function to be called if you want to close the widget once the payment has been sent (not yet confirmed>'
}
```

Expand All @@ -110,7 +111,8 @@ The widget will call the `confirmed` function passing the following object as an
tx: '<the transaction hash of the confirmed transaction>',
amount: '<the expected payment amount as big number string>',
token: '<the expected token address>',
from: `<the address from which the payment is sent>`
from: `<the address from which the payment is sent>`,
close: '<a function to be called if you want to close the widget once the payment has been confirmed>'
}
```

Expand Down
108 changes: 55 additions & 53 deletions dist/cjs/index.bundle.js

Large diffs are not rendered by default.

108 changes: 55 additions & 53 deletions dist/cjs/index.js

Large diffs are not rendered by default.

108 changes: 55 additions & 53 deletions dist/es/index.bundle.js

Large diffs are not rendered by default.

108 changes: 55 additions & 53 deletions dist/es/index.js

Large diffs are not rendered by default.

108 changes: 55 additions & 53 deletions dist/umd/index.bundle.js

Large diffs are not rendered by default.

108 changes: 55 additions & 53 deletions dist/umd/index.js

Large diffs are not rendered by default.

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": "1.7.6",
"version": "1.8.0",
"description": "Accept and perform crypto payments with DePay. Decentralized payment widgets that simplify crypto payments.",
"main": "./dist/cjs/index.js",
"files": [
Expand Down
6 changes: 4 additions & 2 deletions src/dialogs/PaymentDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ class PaymentDialog extends React.Component {
amount: amountOut,
token: route[route.length-1],
from: from,
nonce: transaction.nonce
nonce: transaction.nonce,
close: dialogContext.closeContainer
});
}
dialogContext.setClosable(false);
Expand All @@ -187,7 +188,8 @@ class PaymentDialog extends React.Component {
tx: transaction.transactionHash,
amount: amountOut,
token: route[route.length-1],
from: from
from: from,
close: dialogContext.closeContainer
});
}
}, 100)
Expand Down

0 comments on commit 5ba7c3d

Please sign in to comment.