Remove null from TxType
This commit is contained in:
@@ -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>>;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user