Skip to content

Commit

Permalink
fix pot loading when user not signed in
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlanglen committed Feb 16, 2024
1 parent b8b4f60 commit 91e87a1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions apps/potlock/widget/Pots/Detail.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,13 @@ if (state.potDetail === null) {
.then((potDetail) => {
if (potDetail.sybil_wrapper_provider) {
const [contractId, methodName] = potDetail.sybil_wrapper_provider.split(":");
Near.asyncView(contractId, methodName, { account_id: context.accountId }).then((result) => {
// console.log("sybil result: ", result);
State.update({ potDetail, sybilRequirementMet: result });
});
Near.asyncView(contractId, methodName, { account_id: context.accountId })
.then((result) => {
State.update({ potDetail, sybilRequirementMet: result });
})
.catch((e) => {
State.update({ potDetail, sybilRequirementMet: false });
});
} else {
State.update({ potDetail, sybilRequirementMet: true });
}
Expand Down

0 comments on commit 91e87a1

Please sign in to comment.