Skip to content

Commit

Permalink
Replace toString with toFixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ryutamago committed Sep 29, 2023
1 parent 8d09a57 commit 8c5ca79
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/SendFlow/Tez/FormPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export type FormValues = {

const toOperation = (formValues: FormValues): TezTransfer => ({
type: "tez",
amount: tezToMutez(formValues.prettyAmount).toString(),
amount: tezToMutez(formValues.prettyAmount).toFixed(),
recipient: parsePkh(formValues.recipient),
});

Expand Down
1 change: 0 additions & 1 deletion src/types/Token.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
artifactUri,
formatTokenAmount,
fromRaw,
getRealAmount,
getRealAmountInString,
metadataUri,
mimeType,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function validateNonNegativeNumber(num: string): string | null {
if (val.isLessThan(0)) {
return null;
}
return val.toString();
return val.toFixed();
}

export const navigateToExternalLink = (link: string) => {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/hooks/assetsHooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export const useTotalBalance = () => {

const usdBalance = tezToDollar(mutezToTez(totalBalance));

return { mutez: totalBalance.toString(), usd: usdBalance };
return { mutez: totalBalance.toFixed(), usd: usdBalance };
};

export const useGetAccountBalance = () => {
Expand Down

0 comments on commit 8c5ca79

Please sign in to comment.