alpha-wallet-ios icon indicating copy to clipboard operation
alpha-wallet-ios copied to clipboard

Wallet connect request with Local Notifications

Open oa-s opened this issue 3 years ago • 8 comments

It would be greate if to use local notification for wallet connect requests, in case if the app in backgroud. To notify user about incoming request

oa-s avatar Jan 19 '22 10:01 oa-s

Sounds useful. So request background time if there’s an active WalletConnect session? Want to try it out?

Actually without this, what happens if the app is suspended, an incoming request and the app is resumed? Is it queued?

hboon avatar Jan 19 '22 12:01 hboon

But wait. Doesn’t the universal link for AlphaWallet get triggered and the apps switched to for signing requests?

hboon avatar Jan 19 '22 12:01 hboon

Sounds useful. So request background time if there’s an active WalletConnect session? Want to try it out?

actually don't know for now, it needs to check.

oa-s avatar Jan 20 '22 06:01 oa-s

But wait. Doesn’t the universal link for AlphaWallet get triggered and the apps switched to for signing requests?

it the app get triggered by universal link (and its in suspended state) it still should process the universal link, and open approproate screen.

oa-s avatar Jan 20 '22 06:01 oa-s

so yes, we need to check if there is connection for socket with WalletConnect

oa-s avatar Jan 20 '22 07:01 oa-s

But wait. Doesn’t the universal link for AlphaWallet get triggered and the apps switched to for signing requests?

it the app get triggered by universal link (and its in suspended state) it still should process the universal link, and open approproate screen.

Oh of course! The user wouldn't know to check their phone I guess, even if the app is triggered via Universal Link. Yes, good to explore this.

hboon avatar Jan 20 '22 07:01 hboon

Close due to disconnection web socket on entering background:

@objc
    private func appDidEnterBackground() {
        wakuRelay.disconnect(closeCode: .goingAway)
    }

oa-s avatar Jan 26 '22 08:01 oa-s

@oa-s can we request for background time and delay calling disconnect() until background session is expiring?

Do close if it's concluded after this.

hboon avatar Jan 27 '22 04:01 hboon