message: feat(QR): set syncOptions in constructor of AccountAddressPage instead of a getter
diff: @@ -26,7 +26,23 @@ interface SyncOption {
  export class AccountAddressPage {
  public wallet: AirGapWallet
  - public get syncOptions(): SyncOption[] {
  + public syncOptions: SyncOption[]
  +
  + private shareObject?: IACMessageDefinitionObjectV3[]
  + private shareObjectPromise?: Promise<void>
  + private walletShareUrl?: string
  +
  + constructor(
  + private readonly popoverCtrl: PopoverController,
  + private readonly clipboardService: ClipboardService,
  + private readonly shareUrlService: ShareUrlService,
  + private readonly interactionService: InteractionService,
  + private readonly navigationService: NavigationService,
  + private readonly uiEventService: UiEventService,
  + private readonly migrationService: MigrationService,
  + private readonly deepLinkService: DeeplinkService
  + ) {
  + this.wallet = this.navigationService.getState().wallet
  const defaultOption = {
  icon: 'airgap-wallet-app-logo.png',
  name: 'AirGap Wallet',
  @@ -35,7 +51,7 @@ export class AccountAddressPage {
  switch (this.wallet?.protocol.identifier) {
  case MainProtocolSymbols.BTC:
  case MainProtocolSymbols.BTC_SEGWIT:
  - return [
  + this.syncOptions = [
  {
  icon: 'bluewallet.png',
  name: 'BlueWallet',
  @@ -48,9 +64,9 @@ export class AccountAddressPage {
  },
  defaultOption
  ]
  -
  + break
  case MainProtocolSymbols.ETH:
  - return [
  + this.syncOptions = [
  {
  icon: 'metamask.webp',
  name: 'MetaMask',
  @@ -58,28 +74,12 @@ export class AccountAddressPage {
  },
  defaultOption
  ]
  + break
  default:
  - return [defaultOption]
  + this.syncOptions = [defaultOption]
  }
  }
  - private shareObject?: IACMessageDefinitionObjectV3[]
  - private shareObjectPromise?: Promise<void>
  - private walletShareUrl?: string
  -
  - constructor(
  - private readonly popoverCtrl: PopoverController,
  - private readonly clipboardService: ClipboardService,
  - private readonly shareUrlService: ShareUrlService,
  - private readonly interactionService: InteractionService,
  - private readonly navigationService: NavigationService,
  - private readonly uiEventService: UiEventService,
  - private readonly migrationService: MigrationService,
  - private readonly deepLinkService: DeeplinkService
  - ) {
  - this.wallet = this.navigationService.getState().wallet
  - }
  -
  public done(): void {
  this.navigationService.routeToAccountsTab().catch(handleErrorLocal(ErrorCategory.IONIC_NAVIGATION))
  }
  