Remove null typing for account on forms
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user