mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-03 10:14:04 +00:00
fix(@desktop/wallet): Add back code missing after a merge conflict with another PR
This commit is contained in:
parent
461f4a2bee
commit
399eb75eb0
@ -125,6 +125,7 @@ method notifyFilterChanged(self: Module) =
|
||||
self.assetsModule.filterChanged(self.filter.addresses, self.filter.chainIds)
|
||||
self.collectiblesModule.filterChanged(self.filter.addresses, self.filter.chainIds)
|
||||
self.transactionsModule.filterChanged(self.filter.addresses, self.filter.chainIds)
|
||||
self.sendModule.filterChanged(self.filter.addresses, self.filter.chainIds)
|
||||
|
||||
method getCurrencyAmount*(self: Module, amount: float64, symbol: string): CurrencyAmount =
|
||||
return self.controller.getCurrencyAmount(amount, symbol)
|
||||
|
@ -57,11 +57,11 @@ method authenticateUser*(self: AccessInterface) {.base.} =
|
||||
method onUserAuthenticated*(self: AccessInterface, pin: string, password: string, keyUid: string) {.base.} =
|
||||
raise newException(ValueError, "No implementation available")
|
||||
|
||||
method switchAccount*(self: AccessInterface, accountIndex: int) =
|
||||
raise newException(ValueError, "No implementation available")
|
||||
|
||||
method setSelectedSenderAccountIndex*(self: AccessInterface, index: int) =
|
||||
raise newException(ValueError, "No implementation available")
|
||||
|
||||
method setSelectedReceiveAccountIndex*(self: AccessInterface, index: int) =
|
||||
raise newException(ValueError, "No implementation available")
|
||||
|
||||
method filterChanged*(self: AccessInterface, addresses: seq[string], chainIds: seq[int]) =
|
||||
raise newException(ValueError, "No implementation available")
|
||||
|
@ -195,11 +195,11 @@ method suggestedRoutesReady*(self: Module, suggestedRoutes: string) =
|
||||
method getEstimatedTime*(self: Module, chainId: int, maxFeePerGas: string): int =
|
||||
return self.controller.getEstimatedTime(chainId, maxFeePerGas).int
|
||||
|
||||
method switchAccount*(self: Module, accountIndex: int) =
|
||||
var walletAccount = self.controller.getWalletAccountByIndex(accountIndex)
|
||||
if not walletAccount.isNil:
|
||||
self.view.switchSenderAccountByAddress(walletAccount.address)
|
||||
self.view.switchReceiveAccount(accountIndex)
|
||||
method filterChanged*(self: Module, addresses: seq[string], chainIds: seq[int]) =
|
||||
if addresses.len == 0:
|
||||
return
|
||||
self.view.switchSenderAccountByAddress(addresses[0])
|
||||
self.view.switchReceiveAccountByAddress(addresses[0])
|
||||
|
||||
method setSelectedSenderAccountIndex*(self: Module, index: int) =
|
||||
self.senderCurrentAccountIndex = index
|
||||
|
@ -154,6 +154,11 @@ QtObject:
|
||||
self.setSelectedSenderAccount(account)
|
||||
self.delegate.setSelectedSenderAccountIndex(index)
|
||||
|
||||
proc switchReceiveAccountByAddress*(self: View, address: string) =
|
||||
let (account, index) = self.accounts.getItemByAddress(address)
|
||||
self.setSelectetReceiveAccount(account)
|
||||
self.delegate.setSelectedReceiveAccountIndex(index)
|
||||
|
||||
proc switchSenderAccount*(self: View, index: int) {.slot.} =
|
||||
self.setSelectedSenderAccount(self.senderAccounts.getItemByIndex(index))
|
||||
self.delegate.setSelectedSenderAccountIndex(index)
|
||||
|
Loading…
x
Reference in New Issue
Block a user