Remove null from TxType

This commit is contained in:
abefernan
2023-04-27 16:39:45 +02:00
parent 4ca103b317
commit f342bf679e
4 changed files with 4 additions and 4 deletions
@@ -7,7 +7,7 @@ import MsgSendForm from "./MsgSendForm";
import MsgUndelegateForm from "./MsgUndelegateForm";
type MsgFormProps = {
readonly txType: NonNullable<TxType>;
readonly txType: TxType;
} & {
readonly senderAddress: string;
readonly setCheckAndGetMsg: Dispatch<SetStateAction<(() => TxMsg | null) | undefined>>;
+1 -1
View File
@@ -13,7 +13,7 @@ import MsgForm from "./MsgForm";
interface CreateTxFormProps {
readonly router: NextRouter;
readonly txType: NonNullable<TxType>;
readonly txType: TxType;
readonly senderAddress: string;
readonly accountOnChain: Account;
readonly closeForm: () => void;
+1 -1
View File
@@ -27,7 +27,7 @@ const Multipage = () => {
const { state } = useAppContext();
assert(state.chain.addressPrefix, "address prefix missing");
const [txType, setTxType] = useState<TxType>(null);
const [txType, setTxType] = useState<TxType | null>(null);
const [holdings, setHoldings] = useState<readonly Coin[]>([]);
const [multisigAddress, setMultisigAddress] = useState("");
const [accountOnChain, setAccountOnChain] = useState<Account | null>(null);
+1 -1
View File
@@ -1,4 +1,4 @@
export type TxType = null | "send" | "delegate" | "undelegate" | "redelegate" | "claimRewards";
export type TxType = "send" | "delegate" | "undelegate" | "redelegate" | "claimRewards";
export type TxMsg =
| TxMsgSend