Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
Check claims disconnected (#2281)
Browse files Browse the repository at this point in the history
* It's connected when `account` is set

* Allow claim search when disconnected

Co-authored-by: Leandro <[email protected]>
  • Loading branch information
alfetopito and Leandro authored Jan 25, 2022
1 parent 9b3cde3 commit 19adb51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/custom/pages/Claim/FooterNavButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default function FooterNavButtons({
const isInputAddressValid = isAddress(resolvedAddress || '')

// User is connected and has some unclaimed claims
const isConnectedAndHasClaims = !!activeClaimAccount && !!hasClaims && claimStatus === ClaimStatus.DEFAULT
const isConnectedAndHasClaims = account && activeClaimAccount && hasClaims && claimStatus === ClaimStatus.DEFAULT
const noPaidClaimsSelected = !selected.length

let buttonContent: ReactNode = null
Expand Down
5 changes: 1 addition & 4 deletions src/custom/pages/Claim/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,7 @@ export default function Claim() {

// on account/activeAccount/non-connected account (if claiming for someone else) change
useEffect(() => {
// disconnected wallet?
if (!account) {
setActiveClaimAccount('')
} else if (!isSearchUsed) {
if (!isSearchUsed && account) {
setActiveClaimAccount(account)
}

Expand Down

0 comments on commit 19adb51

Please sign in to comment.