Skip to content

Commit 77afd27

Browse files
authored
release 0.7.2 (#170)
* made sure if user not ready to transact, send transaction returns early (#169) * update to 0.7.2
1 parent 8bdfcd0 commit 77afd27

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,16 @@ yarn add bnc-assist
4343
#### Script Tag
4444

4545
The library uses [semantic versioning](https://semver.org/spec/v2.0.0.html).
46-
The current version is 0.7.1.
46+
The current version is 0.7.2.
4747
There are minified and non-minified versions.
4848
Put this script at the top of your `<head>`
4949

5050
```html
51-
<script src="https://assist.blocknative.com/0-7-1/assist.js"></script>
51+
<script src="https://assist.blocknative.com/0-7-2/assist.js"></script>
5252

5353
<!-- OR... -->
5454

55-
<script src="https://assist.blocknative.com/0-7-1/assist.min.js"></script>
55+
<script src="https://assist.blocknative.com/0-7-2/assist.min.js"></script>
5656
```
5757

5858
### Initialize the Library

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bnc-assist",
3-
"version": "0.7.1",
3+
"version": "0.7.2",
44
"description": "Blocknative Assist js library for Dapp developers",
55
"main": "lib/assist.min.js",
66
"scripts": {

src/js/logic/send-transaction.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,17 @@ function sendTransaction(
4141
)
4242

4343
// Check user is ready to make the transaction
44-
const [sufficientBalance] = await Promise.all([
44+
const [sufficientBalance, ready] = await Promise.all([
4545
hasSufficientBalance(transactionParams),
4646
prepareForTransaction('activePreflight').catch(
4747
handleError({ resolve, reject, callback })
4848
)
4949
])
5050

51+
if (!ready) {
52+
return
53+
}
54+
5155
// Make sure that we have from address in txOptions
5256
if (!txOptions.from) {
5357
txOptions.from = state.accountAddress

0 commit comments

Comments
 (0)