Skip to content

Commit

Permalink
refactor(@desktop/wallet): remove unused 'collectible' module
Browse files Browse the repository at this point in the history
  • Loading branch information
dlipicar committed Nov 23, 2022
1 parent ecd799c commit 4907f52
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 209 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ method switchAccount*(self: AccessInterface, accountIndex: int) {.base.} =
raise newException(ValueError, "No implementation available")

# Methods called by submodules of this module
method collectibleModuleDidLoad*(self: AccessInterface) {.base.} =
raise newException(ValueError, "No implementation available")

method collectiblesModuleDidLoad*(self: AccessInterface) {.base.} =
raise newException(ValueError, "No implementation available")

Expand Down
11 changes: 0 additions & 11 deletions src/app/modules/main/wallet_section/collectibles/module.nim
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import ../../../../core/eventemitter
import ../../../../../app_service/service/collectible/service as collectible_service
import ../../../../../app_service/service/wallet_account/service as wallet_account_service

import ./collectible/module as collectible_module
import ./collections/module as collections_module
import ./collectibles/module as collectibles_module
import ./current_collectible/module as current_collectible_module
Expand All @@ -19,7 +18,6 @@ type

collectiblesModule: collectibles_module.AccessInterface
collectionsModule: collections_module.AccessInterface
collectibleModule: collectible_module.AccessInterface
currentCollectibleModule: current_collectible_module.AccessInterface

proc newModule*(
Expand All @@ -35,20 +33,17 @@ proc newModule*(

result.collectiblesModule = collectibles_module.newModule(result, collectibleService)
result.collectionsModule = collectionsModule.newModule(result, events, collectibleService)
result.collectibleModule = collectibleModule.newModule(result, collectibleService)
result.currentCollectibleModule = currentCollectibleModule.newModule(result, result.collectionsModule, result.collectiblesModule)

method delete*(self: Module) =
self.collectiblesModule.delete
self.collectionsModule.delete
self.collectibleModule.delete
self.currentCollectibleModule.delete

method load*(self: Module) =
self.controller.init
self.collectiblesModule.load
self.collectionsModule.load
self.collectibleModule.load
self.currentCollectibleModule.load

method isLoaded*(self: Module): bool =
Expand All @@ -61,18 +56,12 @@ proc checkIfModuleDidLoad(self: Module) =
if(not self.collectionsModule.isLoaded()):
return

if(not self.collectibleModule.isLoaded()):
return

if(not self.currentCollectibleModule.isLoaded()):
return

self.moduleLoaded = true
self.delegate.collectiblesModuleDidLoad()

method collectibleModuleDidLoad*(self: Module) =
self.checkIfModuleDidLoad()

method collectiblesModuleDidLoad*(self: Module) =
self.checkIfModuleDidLoad()

Expand Down

0 comments on commit 4907f52

Please sign in to comment.