Skip to content

Commit

Permalink
ReferralSystem: Insufficient Bonded Amount Fix (#698) (#704)
Browse files Browse the repository at this point in the history
* ReferralSystem: Insufficient Bonded Amount Fix.

Co-authored-by: Alex Natalia <[email protected]>
  • Loading branch information
stefashkaa and alexnatalia authored Jun 3, 2022
1 parent bfab14b commit f9ed6c6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/views/ReferralProgram.vue
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ import last from 'lodash/fp/last';
import { Component, Mixins, Watch } from 'vue-property-decorator';
import { components, mixins, api, WALLET_TYPES } from '@soramitsu/soraneo-wallet-web';
import { XOR } from '@sora-substrate/util/build/assets/consts';
import type { CodecString, FPNumber } from '@sora-substrate/util';
import { FPNumber } from '@sora-substrate/util';
import type { CodecString } from '@sora-substrate/util';
import type { AccountAsset } from '@sora-substrate/util/build/assets/types';
import router, { lazyView } from '@/router';
Expand Down Expand Up @@ -264,7 +265,12 @@ export default class ReferralProgram extends Mixins(
}
get isInsufficientBondedAmount(): boolean {
return this.bondedXorCodecBalance ? this.networkFees.ReferralSetInvitedUser > this.bondedXorCodecBalance : false;
return this.bondedXorCodecBalance
? FPNumber.gt(
this.getFPNumberFromCodec(this.networkFees.ReferralSetInvitedUser),
this.getFPNumberFromCodec(this.bondedXorCodecBalance)
)
: false;
}
get formattedBondedXorBalance(): string {
Expand Down

0 comments on commit f9ed6c6

Please sign in to comment.