Skip to content

Commit

Permalink
default state fees
Browse files Browse the repository at this point in the history
  • Loading branch information
Thykof committed May 20, 2024
1 parent cefe77e commit 72b7948
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions wails-frontend/src/pages/PasswordPromptHandler/Sign.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ export function Sign() {
const signData = req.Data as SignBodyProps;
const [error, setError] = useState<IErrorObject | null>(null);
const [errorMessage, setErrorMessage] = useState<string>('');
const [fees, setFees] = useState<string>(toMAS(signData.Fees).toString());
const [fees, setFees] = useState<string>(
toMAS(signData.Fees || '0').toString(),
);
const [isEditing, setIsEditing] = useState(false);

function save(e: SyntheticEvent) {
Expand All @@ -96,11 +98,7 @@ export function Sign() {

EventsOnce(events.promptResult, handleResult);

SendSignPromptInput(
password,
fromMAS(fees || '0').toString(),
req.CorrelationID,
);
SendSignPromptInput(password, fromMAS(fees).toString(), req.CorrelationID);
}

function handleResult(result: promptResult) {
Expand Down

0 comments on commit 72b7948

Please sign in to comment.