Sjors / nthkey-ios

Your iOs device in a Bitcoin multi-sig
https://nthkey.com
MIT License
17 stars 7 forks source link

Subscription for mainnet #44

Closed w-i-n-s closed 3 years ago

w-i-n-s commented 3 years ago

resolve #20

Sjors commented 3 years ago

Some UI suggestions (I know this PR is still draft):

Schermafbeelding 2021-05-03 om 10 50 42

Let's disable the Mainnet tabs under "Import" and "Announce". Then, under misc, add "Mainnet Subscription". This should open a new view (SubscriptionView.swift?) where we can show the status and explain the subscription. I believe this also needs to have a "restore existing purchase" button according to the app store rules?

In the list of wallets, don't disable mainnet wallets. In the sign screen, the sign button should be disabled and there should be a link to SubscriptionView.

w-i-n-s commented 3 years ago

@Sjors

Let's disable the Mainnet tabs under "Import" and "Announce". Then, under misc, add "Mainnet Subscription". This should open a new view (SubscriptionView.swift?) where we can show the status and explain the subscription. I believe this also needs to have a "restore existing purchase" button according to the app store rules?

In the list of wallets, don't disable mainnet wallets. In the sign screen, the sign button should be disabled and there should be a link to SubscriptionView.

UI and navigation was fixed in d35bb2cf21ab61442fab04014769a539e11362f4

Sjors commented 3 years ago

It's difficult to dismiss this modal (at least in the simulator). Maybe make it smaller?

Schermafbeelding 2021-05-19 om 19 58 54
Sjors commented 3 years ago

I get a crash when clicking Subscribe Now:

Schermafbeelding 2021-05-19 om 20 00 19
w-i-n-s commented 3 years ago

It's difficult to dismiss this modal (at least in the simulator).

Added Close button af422bc5b2ab5b41ef3046702fd6c7c5b1fe68fe

Maybe make it smaller?

I think it should be modal, but if you want then I can set it as half-screen overlay. How does it sound @Sjors ?

w-i-n-s commented 3 years ago

I get a crash when clicking Subscribe Now:

It happens because products didn't receive before you tap on the button. I did implement FSM
4e93f3f7dfcc3d413f2e409b34d56eb8904081e7 to avoid such issues and show loader before received any SKProducts from appstore.

Also, for test purchase on simulator (iOS14 & Xcode12 allow it) you should select another configuration - first on picture below

Снимок экрана 2021-05-20 в 23 33 43
Sjors commented 3 years ago

On the sign screen, if the user selects the mainnet wallet, and they are not (or no longer) subscribed, let's disable the "scan psbt" and "load psbt" buttons and display a link: "A subscription is required to sign with this wallet". Clicking that opens the modal.

Sjors commented 3 years ago

Some minor issues:

Schermafbeelding 2021-05-24 om 17 53 22

The modal should be closed when a purchase is successful.

Sjors commented 3 years ago

I was able to make a purchase using the sandbox user. However the "Use real Bitcoin (mainnet)" dialog doesn't close when the purchase is complete.

I also suggest making the "Subscribe Now" button grey while the purchase is in progress.

Both these issues can wait for a future PR if they're not simple.