Skip to content

Commit

Permalink
Fix the "not found owner" error
Browse files Browse the repository at this point in the history
  • Loading branch information
Spl3en committed Sep 17, 2019
1 parent e9287c0 commit d6c912d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -23,4 +23,5 @@ yarn-debug.log*
yarn-error.log*

package-lock.json
obsidian.code-workspace
obsidian.code-workspace
build.sh
4 changes: 3 additions & 1 deletion src/components/App/Header/Login/index.js
Expand Up @@ -19,15 +19,17 @@ const Login = ({
} else {
api.iconexAskAddress().then(address => {
if (address) {
var found = false
owners.forEach(owner => {
if (owner === address) {
found = true
setLoggedWallet(address)
window.sessionStorage.setItem('LoggedWallet', address)
setInfoMessage('Successfully connected!')
}
})

if (!loggedWallet) {
if (!found) {
throw new Error('This wallet is not a wallet owner')
}
}
Expand Down

0 comments on commit d6c912d

Please sign in to comment.