Remove null typing for account on forms

This commit is contained in:
abefernan
2023-04-24 22:42:37 +02:00
parent dfe68ccb89
commit c7238ae6bd
4 changed files with 4 additions and 8 deletions
+1 -2
View File
@@ -12,7 +12,7 @@ import StackableContainer from "../layout/StackableContainer";
interface Props {
delegatorAddress: string;
accountOnChain: Account | null;
accountOnChain: Account;
router: NextRouter;
closeForm: () => void;
}
@@ -49,7 +49,6 @@ const DelegationForm = (props: Props) => {
assert(gasPrice, "gasPrice missing");
const fee = calculateFee(gasLimit, gasPrice);
const { accountOnChain } = props;
assert(accountOnChain, "accountOnChain missing");
assert(typeof accountOnChain.accountNumber === "number", "accountNumber missing");
return {
accountNumber: accountOnChain.accountNumber,
+1 -2
View File
@@ -12,7 +12,7 @@ import StackableContainer from "../layout/StackableContainer";
interface Props {
delegatorAddress: string;
accountOnChain: Account | null;
accountOnChain: Account;
router: NextRouter;
closeForm: () => void;
}
@@ -56,7 +56,6 @@ const ReDelegationForm = (props: Props) => {
assert(gasPrice, "gasPrice missing");
const fee = calculateFee(gasLimit, gasPrice);
const { accountOnChain } = props;
assert(accountOnChain, "accountOnChain missing");
assert(typeof accountOnChain.accountNumber === "number", "accountNumber missing");
return {
accountNumber: accountOnChain.accountNumber,
+1 -2
View File
@@ -11,7 +11,7 @@ import StackableContainer from "../layout/StackableContainer";
interface Props {
delegatorAddress: string;
accountOnChain: Account | null;
accountOnChain: Account;
router: NextRouter;
closeForm: () => void;
}
@@ -39,7 +39,6 @@ const RewardsForm = (props: Props) => {
assert(gasPrice, "gasPrice missing");
const fee = calculateFee(gasLimit, gasPrice);
const { accountOnChain } = props;
assert(accountOnChain, "accountOnChain missing");
assert(typeof accountOnChain.accountNumber === "number", "accountNumber missing");
return {
accountNumber: accountOnChain.accountNumber,
+1 -2
View File
@@ -12,7 +12,7 @@ import StackableContainer from "../layout/StackableContainer";
interface Props {
address: string | null;
accountOnChain: Account | null;
accountOnChain: Account;
router: NextRouter;
closeForm: () => void;
}
@@ -51,7 +51,6 @@ const TransactionForm = (props: Props) => {
assert(gasPrice, "gasPrice missing");
const fee = calculateFee(gasLimit, gasPrice);
const { accountOnChain } = props;
assert(accountOnChain, "accountOnChain missing");
assert(typeof accountOnChain.accountNumber === "number", "accountNumber missing");
return {
accountNumber: accountOnChain.accountNumber,