some fixes
This commit is contained in:
@@ -38,7 +38,7 @@ AllowedIPs = 0.0.0.0/0
|
||||
Endpoint = ${servers?.[selectedServer]?.endpoint}
|
||||
PersistentKeepalive = 25
|
||||
`,
|
||||
[store.vpnServers, store.vpnPrivateKey, selectedServer]
|
||||
[servers, store.vpnPrivateKey, selectedServer]
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -198,7 +198,10 @@ const TransactionPanel = observer(
|
||||
<button
|
||||
className="btn bg-indigo-500 hover:bg-indigo-600 text-white w-full"
|
||||
onClick={() => {
|
||||
postTransaction(delegate.address, BigInt(amount));
|
||||
postTransaction(
|
||||
delegate.address,
|
||||
BigInt(delegate.status === 'Vote' ? amount : amount * -1)
|
||||
);
|
||||
onClose();
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -45,7 +45,7 @@ const TransactionsTable = observer(({ data, rowClick }) => {
|
||||
balance={delegate.token.balance}
|
||||
name={delegate.dpos.delegate.username || delegate.address}
|
||||
total={delegate.dpos.delegate.totalVotesReceived}
|
||||
hasSevice
|
||||
hasSevice={false}
|
||||
date={delegate.date}
|
||||
status={delegate.status}
|
||||
amount={store.accountSentVotes[delegate.address] || 0}
|
||||
|
||||
@@ -564,7 +564,10 @@ class Store {
|
||||
(obj, vote) => ({
|
||||
...obj,
|
||||
[vote.delegateAddress]:
|
||||
BigInt(vote.amount) / 100000000n +
|
||||
BigInt(
|
||||
Number(vote.amount) > 0 ? vote.amount : vote.amount.slice(1)
|
||||
) /
|
||||
100000000n +
|
||||
(obj[vote.delegateAddress] || 0n),
|
||||
}),
|
||||
{}
|
||||
|
||||
Reference in New Issue
Block a user