diff --git a/README.md b/README.md
index 2f5edf98..a04995fa 100644
--- a/README.md
+++ b/README.md
@@ -43,16 +43,16 @@ yarn add bnc-assist
#### Script Tag
The library uses [semantic versioning](https://semver.org/spec/v2.0.0.html).
-The current version is 0.9.0.
+The current version is 0.9.1.
There are minified and non-minified versions.
Put this script at the top of your `
`
```html
-
+
-
+
```
### Initialize the Library
@@ -261,6 +261,7 @@ The function that is defined on the `handleNotificationEvent` property of the co
parameters: Array, // the parameters the method was called with
},
inlineCustomMsgs: Object | Boolean, // the inline custom messages passed to the transaction
+ reason: String, // reason for error type notifications
transaction: {
id: String, // internal unique id for the transaction
from: String, // the address the transaction was sent from
diff --git a/lib/images/brave.png b/lib/images/brave.png
new file mode 100644
index 00000000..c8b30455
Binary files /dev/null and b/lib/images/brave.png differ
diff --git a/lib/images/brave@2x.png b/lib/images/brave@2x.png
new file mode 100644
index 00000000..c04d1879
Binary files /dev/null and b/lib/images/brave@2x.png differ
diff --git a/lib/images/opera-touch.png b/lib/images/opera-touch.png
new file mode 100644
index 00000000..5c50b5da
Binary files /dev/null and b/lib/images/opera-touch.png differ
diff --git a/lib/images/opera-touch@2x.png b/lib/images/opera-touch@2x.png
new file mode 100644
index 00000000..6f6a9406
Binary files /dev/null and b/lib/images/opera-touch@2x.png differ
diff --git a/lib/images/opera.png b/lib/images/opera.png
new file mode 100644
index 00000000..fd4adcf5
Binary files /dev/null and b/lib/images/opera.png differ
diff --git a/lib/images/opera@2x.png b/lib/images/opera@2x.png
new file mode 100644
index 00000000..c803bf00
Binary files /dev/null and b/lib/images/opera@2x.png differ
diff --git a/package.json b/package.json
index f83bdd03..4abd6efb 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "bnc-assist",
- "version": "0.9.0",
+ "version": "0.9.1",
"description": "Blocknative Assist js library for Dapp developers",
"main": "lib/assist.min.js",
"scripts": {
diff --git a/src/__integration-tests__/ui-rendering/__snapshots__/index.test.js.snap b/src/__integration-tests__/ui-rendering/__snapshots__/index.test.js.snap
index 1a3dec8b..b57a2d6a 100644
--- a/src/__integration-tests__/ui-rendering/__snapshots__/index.test.js.snap
+++ b/src/__integration-tests__/ui-rendering/__snapshots__/index.test.js.snap
@@ -1621,7 +1621,7 @@ exports[`dom-rendering event onboard-browserFail should trigger correct DOM rend
This Dapp is not supported in Chrome. Please visit us in one of the following browsers. Thank You!
-
+
@@ -1633,6 +1633,18 @@ exports[`dom-rendering event onboard-browserFail should trigger correct DOM rend
Firefox
+
+
+
+
+ Opera
+
+
+
+
+ Brave
+
+
diff --git a/src/css/styles.css b/src/css/styles.css
index 8ff1098e..31fc9daf 100644
--- a/src/css/styles.css
+++ b/src/css/styles.css
@@ -1177,6 +1177,10 @@ input[type='button'].bn-btn-block {
color: #fff;
}
+.btn-row {
+ margin-bottom: 6px;
+}
+
/* GENERAL */
.flex-row {
diff --git a/src/js/helpers/events.js b/src/js/helpers/events.js
index 0ccf4403..11a44e95 100644
--- a/src/js/helpers/events.js
+++ b/src/js/helpers/events.js
@@ -44,7 +44,7 @@ export function handleEvent(eventObj, clickHandlers) {
? handleNotificationEvent(eventObj)
: true
- if (!showNotification) {
+ if (!showNotification && !headlessMode) {
removeUnwantedNotifications(eventCode, transaction.id)
}
}
diff --git a/src/js/helpers/validation.js b/src/js/helpers/validation.js
index 033cffa8..4d978ce2 100644
--- a/src/js/helpers/validation.js
+++ b/src/js/helpers/validation.js
@@ -21,7 +21,7 @@ export function validateConfig(config) {
web3: ow.optional.object,
ethers: ow.optional.object,
mobileBlocked: ow.optional.boolean,
- minimumBalance: ow.optional.number,
+ minimumBalance: ow.optional.string,
headlessMode: ow.optional.boolean,
messages: ow.optional.object.exactShape({
txRequest: ow.optional.function,
diff --git a/src/js/logic/user.js b/src/js/logic/user.js
index 7dc0ed8a..998390c5 100644
--- a/src/js/logic/user.js
+++ b/src/js/logic/user.js
@@ -215,7 +215,9 @@ function getWeb3Wallet(categoryCode) {
}, timeouts.changeUI),
onClick: () => {
if (state.mobileDevice) {
- window.location = `https://links.trustwalletapp.com/a/key_live_lfvIpVeI9TFWxPCqwU8rZnogFqhnzs4D?&event=openURL&url=${window.location.href}`
+ window.location = `https://links.trustwalletapp.com/a/key_live_lfvIpVeI9TFWxPCqwU8rZnogFqhnzs4D?&event=openURL&url=${
+ window.location.href
+ }`
} else {
window.location.reload()
}
diff --git a/src/js/views/content.js b/src/js/views/content.js
index 74c19545..d21a1dfd 100644
--- a/src/js/views/content.js
+++ b/src/js/views/content.js
@@ -58,6 +58,15 @@ import trustLogo2x from '../../../lib/images/trust@2x.png'
import coinbaseLogo from '../../../lib/images/coinbase.png'
import coinbaseLogo2x from '../../../lib/images/coinbase@2x.png'
+import braveLogo from '../../../lib/images/brave.png'
+import braveLogo2x from '../../../lib/images/brave@2x.png'
+
+import operaLogo from '../../../lib/images/opera.png'
+import operaLogo2x from '../../../lib/images/opera@2x.png'
+
+import operaTouchLogo from '../../../lib/images/opera-touch.png'
+import operaTouchLogo2x from '../../../lib/images/opera-touch@2x.png'
+
export const notSupported = {
mobileNotSupported: {
heading: 'Mobile Not Supported',
@@ -67,12 +76,14 @@ export const notSupported = {
browserNotSupported: {
heading: 'This Browser is Not Supported',
description: () =>
- `This Dapp is not supported in ${state.userAgent.browser.name}. Please visit us in one of the following browsers. Thank You!`
+ `This Dapp is not supported in ${
+ state.userAgent.browser.name
+ }. Please visit us in one of the following browsers. Thank You!`
},
mobileWalletNotSupported: {
heading: 'Install A Mobile Dapp Wallet',
description: () =>
- 'A mobile ethereum wallet is needed to use this dapp. We recommend Trust or Coinbase wallet.'
+ 'A mobile ethereum wallet is needed to use this dapp. We recommend one of the following mobile wallets.'
}
}
@@ -293,6 +304,18 @@ export const imageSrc = {
src: coinbaseLogo,
srcset: coinbaseLogo2x
},
+ braveLogo: {
+ src: braveLogo,
+ srcset: braveLogo2x
+ },
+ operaLogo: {
+ src: operaLogo,
+ srcset: operaLogo2x
+ },
+ operaTouchLogo: {
+ src: operaTouchLogo,
+ srcset: operaTouchLogo2x
+ },
mobileWallet: {
src: mobileWallet,
srcset: mobileWallet2x
diff --git a/src/js/views/dom.js b/src/js/views/dom.js
index a9335708..0baab627 100644
--- a/src/js/views/dom.js
+++ b/src/js/views/dom.js
@@ -218,9 +218,9 @@ export function notSupportedImage(type) {
}
export function browserLogos() {
- const { chromeLogo, firefoxLogo } = imageSrc
+ const { chromeLogo, firefoxLogo, braveLogo, operaLogo } = imageSrc
return `
-
+
+
+
+
+
+ Opera
+
+
+
+
+ Brave
+
+
`
}
function walletLogos() {
- const { trustLogo, coinbaseLogo } = imageSrc
+ const { trustLogo, coinbaseLogo, operaTouchLogo } = imageSrc
return `
-
-
+
+
@@ -258,13 +278,24 @@ function walletLogos() {
Coinbase
+
+
+
+
+ Opera Touch
+
+
`
}