handle objects in snackbar messages
metamask returns objects
This commit is contained in:
parent
77850e472a
commit
3ba02674d1
|
@ -80,7 +80,12 @@ class App extends React.Component {
|
|||
}
|
||||
|
||||
openSnackBar = (variant, message) => {
|
||||
this.setState({ snackbar: { variant, message } })
|
||||
if (typeof message === 'object') {
|
||||
const msg = message.message
|
||||
this.setState({ snackbar: { variant, message: msg } })
|
||||
} else {
|
||||
this.setState({ snackbar: { variant, message } })
|
||||
}
|
||||
}
|
||||
|
||||
closeSnackBar = () => {
|
||||
|
|
Loading…
Reference in New Issue