From c8a167e3bca2ebd00e6fb6565e04ea70bc4979a0 Mon Sep 17 00:00:00 2001 From: theborakompanioni Date: Fri, 22 Sep 2023 19:08:09 +0200 Subject: [PATCH] dev(auth): wallet name is readonly --- src/context/WalletContext.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/context/WalletContext.tsx b/src/context/WalletContext.tsx index 89725e9f..90f96c5d 100644 --- a/src/context/WalletContext.tsx +++ b/src/context/WalletContext.tsx @@ -13,7 +13,7 @@ export interface CurrentWallet { } class CurrentWalletImpl implements CurrentWallet { - name: Api.WalletName + readonly name: Api.WalletName #token: Api.ApiToken constructor(name: Api.WalletName, token: Api.ApiToken) { @@ -203,7 +203,7 @@ const toWalletInfo = (data: CombinedRawWalletData): WalletInfo => { const toCombinedRawData = (utxos: UtxosResponse, display: WalletDisplayResponse) => ({ utxos, display }) const WalletProvider = ({ children }: PropsWithChildren) => { - const [currentWallet, setCurrentWalletOrNull] = useState(restoreWalletFromSession()) + const [currentWallet, setCurrentWalletOrNull] = useState(restoreWalletFromSession) const setCurrentWallet = useCallback( (wallet: CurrentWallet) => {