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