Skip to content

Commit

Permalink
Merge pull request #9 from make-software/fixed-ticket-price-calculation
Browse files Browse the repository at this point in the history
Fixed ticket price calculation
  • Loading branch information
victoriari authored Jun 5, 2024
2 parents 5526140 + 92af560 commit 4f1a4d1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions client/src/app/scenes/play-modal/ModalState.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { csprToMotes } from 'casper-js-sdk';
import Big from 'big.js';
import {
BuyTicketContent,
DeployFailedContent,
Expand All @@ -14,6 +14,7 @@ import {
import { DeployFailed } from '../../services/requests/play-requests';
import useManagePlay from '../../services/hooks/use-manage-play';
import { Play } from '../../types';
import { csprToMotes } from 'casper-js-sdk';

interface PlayResultStateProps {
playResult: Play | DeployFailed;
Expand Down Expand Up @@ -84,9 +85,9 @@ const ModalState = (props: ModalStateProps) => {
window.open('https://testnet.cspr.live/tools/faucet', '_blank');
};

const ticketPrice =
config.gas_price_in_cspr + config.lottery_ticket_price_in_cspr;

const ticketPrice = Big(config.gas_price_in_cspr)
.add(config.lottery_ticket_price_in_cspr)
.toNumber();
const isNotEnoughBalance =
!!activeAccountWithBalance &&
(activeAccountWithBalance.balance == null ||
Expand Down

0 comments on commit 4f1a4d1

Please sign in to comment.