mirror of
https://github.com/minibits-cash/minibits_wallet.git
synced 2026-10-06 11:48:24 +00:00
Fix counters in restore.
This commit is contained in:
@@ -179,7 +179,6 @@ export const RemoteRecoveryScreen: FC<AppStackScreenProps<'RemoteRecovery'>> = o
|
||||
|
||||
try {
|
||||
// TODO allow input or get previous keysets from mint and try to restore from them
|
||||
|
||||
setStatusMessage(`Restoring from ${mint.hostname}...`)
|
||||
log.info('[restore]', `Restoring from ${mint.hostname}...`)
|
||||
|
||||
@@ -192,6 +191,9 @@ export const RemoteRecoveryScreen: FC<AppStackScreenProps<'RemoteRecovery'>> = o
|
||||
|
||||
log.debug('[restore]', `Restored proofs`, proofs.length)
|
||||
setStatusMessage(`Found ${proofs.length} proofs...`)
|
||||
|
||||
// need to move counter by ALL previous proofs!!!
|
||||
mintsStore.increaseProofsCounter(mint.mintUrl, proofs.length)
|
||||
|
||||
if(newKeys) {updateMintKeys(mint.mintUrl as string, newKeys)}
|
||||
|
||||
|
||||
@@ -816,6 +816,13 @@ const MintBalanceSelector = observer(function (props: {
|
||||
text="Send now"
|
||||
onPress={props.onMintBalanceConfirm}
|
||||
style={{marginRight: spacing.medium}}
|
||||
LeftAccessory={() => (
|
||||
<Icon
|
||||
icon="faArrowUp"
|
||||
color="white"
|
||||
size={spacing.medium}
|
||||
/>
|
||||
)}
|
||||
// LeftAccessory={() => <Icon icon="faCoins" color="white" size={spacing.medium} containerStyle={{marginRight: spacing.small}}/>}
|
||||
/>
|
||||
<Button
|
||||
|
||||
@@ -220,9 +220,9 @@ const sendFromMint = async function (
|
||||
counter
|
||||
)
|
||||
|
||||
log.trace('[MintClient.sendFromMint] returnedProofs', returnChange)
|
||||
log.trace('[MintClient.sendFromMint] sentProofs', send)
|
||||
log.trace('[MintClient.sendFromMint] newKeys', newKeys)
|
||||
log.debug('[MintClient.sendFromMint] returnedProofs', returnChange)
|
||||
log.debug('[MintClient.sendFromMint] sentProofs', send)
|
||||
log.debug('[MintClient.sendFromMint] newKeys', newKeys)
|
||||
|
||||
// do some basic validations that proof amounts from mints match
|
||||
const totalAmountToSendFrom = CashuUtils.getProofsAmount(proofsToSendFrom)
|
||||
|
||||
@@ -1185,8 +1185,8 @@ const _sendFromMint = async function (
|
||||
proofsCounter
|
||||
)
|
||||
|
||||
log.debug('[_sendFromMint]', 'returnedProofs', returnedProofs)
|
||||
log.debug('[_sendFromMint]', 'proofsToSend', proofsToSend)
|
||||
// log.debug('[_sendFromMint]', 'returnedProofs', returnedProofs)
|
||||
// log.debug('[_sendFromMint]', 'proofsToSend', proofsToSend)
|
||||
|
||||
if (newKeys) {_updateMintKeys(mintUrl, newKeys)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user