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

Staking fixes #1268

Merged
merged 49 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
2d2ed97
Staking fixes
Sociopacific Jan 11, 2024
9f7c8ba
Fix
Sociopacific Jan 11, 2024
44568d6
Merge branch 'develop' into fix/new-staking-fixes
Sociopacific Jan 22, 2024
a9298a5
Fixes
Sociopacific Jan 15, 2024
696e771
Fix
Sociopacific Jan 24, 2024
547ff80
Merge branch 'develop' into fix/new-staking-fixes
Sociopacific Jan 31, 2024
58d5523
Redeem dialogs
Sociopacific Feb 2, 2024
2c86f60
Fixes
Sociopacific Feb 2, 2024
3ee888d
Fix subscribeOnCurrentEraTotalStake
Sociopacific Feb 5, 2024
71ef58b
Merge branch 'develop' into fix/new-staking-fixes
stefashkaa Feb 5, 2024
a24637c
Withdraw
Sociopacific Feb 7, 2024
5889904
Fixes
Sociopacific Feb 7, 2024
6ba32ae
Merge branch 'develop' into fix/new-staking-fixes
Sociopacific Feb 7, 2024
7dcdfe3
Some fixes
Sociopacific Feb 8, 2024
b38d5f1
Countdown
Sociopacific Feb 8, 2024
5d244d1
Fix countdown position
Sociopacific Feb 8, 2024
9227d0c
Fix countdown calc
Sociopacific Feb 8, 2024
3ba0dea
Validators list
Sociopacific Feb 9, 2024
2a7de7d
Sorting
Sociopacific Feb 9, 2024
9fbd45f
Validator name
Sociopacific Feb 9, 2024
8e5cb5e
Merge branch 'develop' into fix/new-staking-fixes
Sociopacific Feb 9, 2024
82b64ea
Revert env
Sociopacific Feb 9, 2024
9865996
Change default validators sort
Sociopacific Feb 9, 2024
0a57565
Merge branch 'develop' into fix/new-staking-fixes
stefashkaa Feb 9, 2024
1e9771f
Fixes
Sociopacific Feb 9, 2024
ba122fc
Max
Sociopacific Feb 9, 2024
876c71b
focus
Sociopacific Feb 9, 2024
b680896
Countdown translation
Sociopacific Feb 9, 2024
39f5e2d
unbondPeriodFormatted fix
Sociopacific Feb 9, 2024
6aad0bf
Remove comments
Sociopacific Feb 9, 2024
53239fe
Merge branch 'develop' into fix/new-staking-fixes
Sociopacific Feb 12, 2024
b5ca705
Fix colors
Sociopacific Feb 12, 2024
9e35336
Template fixes
Sociopacific Feb 12, 2024
f7bdf6a
Update translations
Sociopacific Feb 12, 2024
7c1fdca
Fix blackout
Sociopacific Feb 16, 2024
4458515
Merge branch 'develop' into fix/new-staking-fixes
C4tWithShell Feb 16, 2024
c3b1382
Merge branch 'develop' into fix/new-staking-fixes
stefashkaa Feb 21, 2024
a730d42
Fix input styles
stefashkaa Feb 22, 2024
0039e0a
Update EraCountdown.vue
stefashkaa Feb 22, 2024
aa238ba
Fix Sonar issues
stefashkaa Feb 22, 2024
794d1ee
Fix notification for withdraw operation
stefashkaa Feb 22, 2024
a1c074e
Max validators
Sociopacific Feb 22, 2024
785feaf
Validators list style fixes
Sociopacific Feb 22, 2024
c843c3e
Remove new stake network fee
Sociopacific Feb 22, 2024
a49057f
Fix styles
Sociopacific Feb 22, 2024
5476f3a
Max fix
Sociopacific Feb 22, 2024
d78dbd4
Merge branch 'develop' into fix/new-staking-fixes
Sociopacific Feb 22, 2024
63f262c
Update translations
Sociopacific Feb 22, 2024
1b5afb4
Remove empty translations
Sociopacific Feb 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix Sonar issues
  • Loading branch information
stefashkaa committed Feb 22, 2024
commit aa238ba69fabcaa704d73e4b2e4b7456530ec91b
2 changes: 1 addition & 1 deletion src/modules/staking/sora/components/WithdrawDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</template>

<script lang="ts">
import { FPNumber, Operation } from '@sora-substrate/util';
import { Operation } from '@sora-substrate/util';
import { components, mixins } from '@soramitsu/soraneo-wallet-web';
import { Component, Mixins } from 'vue-property-decorator';

Expand Down
4 changes: 2 additions & 2 deletions src/modules/staking/sora/mixins/StakingMixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default class StakingMixin extends Mixins(mixins.FormattedAmountMixin, Tr
}

get unlockingFunds(): FPNumber {
return (this.accountLedger?.unlocking || []).reduce((acc, unlock) => {
return (this.accountLedger?.unlocking ?? []).reduce((acc, unlock) => {
return acc.add(FPNumber.fromCodecValue(unlock.value.toString(), this.stakingAsset?.decimals));
}, FPNumber.ZERO);
}
Expand All @@ -132,7 +132,7 @@ export default class StakingMixin extends Mixins(mixins.FormattedAmountMixin, Tr
}

get nextWithdrawalEra(): number | null {
if (!this.accountLedger || !this.accountLedger.unlocking.length || !this.activeEra) {
if (!this.accountLedger?.unlocking.length || !this.activeEra) {
return null;
}
const unlockingEras = this.accountLedger.unlocking.map((u) => u.era);
Expand Down