Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/fleek/1.8.5 #690

Merged
merged 13 commits into from
May 13, 2022
6 changes: 5 additions & 1 deletion src/store/rewards/actions.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { defineActions } from 'direct-vuex';
import { api } from '@soramitsu/soraneo-wallet-web';
import { XOR } from '@sora-substrate/util/build/assets/consts';
import type { RewardInfo, RewardsInfo } from '@sora-substrate/util/build/rewards/types';
import type { Subscription } from '@polkadot/x-rxjs';

Expand All @@ -25,7 +26,10 @@ const actions = defineActions({
let subscription!: Subscription;

await new Promise<void>((resolve) => {
subscription = observable.subscribe((crowdloanRewards) => {
subscription = observable.subscribe((rewards) => {
// XOR is not claimable
const crowdloanRewards = rewards.filter((item) => item.asset.address !== XOR.address);

commit.setRewards({ crowdloanRewards });
const crowdloanRewardsAreAvailable = getters.crowdloanRewardsAvailable.length;

Expand Down