diff --git a/src/views/settings/wallet-settings/wallet-settings.module.css b/src/views/settings/wallet-settings/wallet-settings.module.css index 3e1a5cc4..95d76335 100644 --- a/src/views/settings/wallet-settings/wallet-settings.module.css +++ b/src/views/settings/wallet-settings/wallet-settings.module.css @@ -2,8 +2,8 @@ margin-bottom: 7px; } -.saveWallets{ - margin-top: 7px; +.save { + margin-left: 5px; } .walletTitle { @@ -45,10 +45,6 @@ text-decoration: underline; } -.pasteSignature button { - margin-left: 5px; -} - .show { display: block; } diff --git a/src/views/settings/wallet-settings/wallet-settings.tsx b/src/views/settings/wallet-settings/wallet-settings.tsx index 8bad11e5..5a47b59e 100644 --- a/src/views/settings/wallet-settings/wallet-settings.tsx +++ b/src/views/settings/wallet-settings/wallet-settings.tsx @@ -74,6 +74,24 @@ const CryptoWalletsForm = ({ account }: { account: Account | undefined }) => { setShowWallet(newShowWallet); }; + const save = () => { + const wallets: { [key: string]: { address: string; timestamp: number; signature: { signature: string; type: string } } } = {}; + walletsArray.forEach((wallet) => { + if (wallet.chainTicker && wallet.address && wallet.signature && wallet.timestamp) { + wallets[wallet.chainTicker] = { + address: wallet.address, + timestamp: wallet.timestamp, + signature: { + signature: wallet.signature, + type: 'eip191', + }, + }; + } + }); + setAccount({ ...account, author: { ...account.author, wallets } }); + alert(t('saved')); + }; + const walletsInputs = walletsArray.map((wallet, index) => ( <>