mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-28 06:28:41 +01:00
CAKE-306 | added MoonPay option for BTC buying; applied PreOrderPage to the app; created Wyre and MoonPay buy providers
This commit is contained in:
@@ -125,39 +125,13 @@ class DashboardPage extends BasePage {
|
||||
image: exchangeImage,
|
||||
title: S.of(context).exchange,
|
||||
route: Routes.exchange),
|
||||
if (walletViewModel.type == WalletType.bitcoin) Observer(
|
||||
builder: (_) => Stack(
|
||||
clipBehavior: Clip.none,
|
||||
alignment: Alignment.topCenter,
|
||||
children: [
|
||||
if (walletViewModel.isRunningWebView) Positioned(
|
||||
top: -5,
|
||||
child: SpinKitRing(
|
||||
color: Theme.of(context).buttonColor,
|
||||
lineWidth: 3,
|
||||
size: 70.0,
|
||||
),
|
||||
),
|
||||
ActionButton(
|
||||
image: buyImage,
|
||||
title: S.of(context).buy,
|
||||
onClick: walletViewModel.isRunningWebView
|
||||
? null
|
||||
: () async {
|
||||
try {
|
||||
walletViewModel.isRunningWebView = true;
|
||||
final url =
|
||||
await walletViewModel.wyreViewModel.wyreUrl;
|
||||
await Navigator.of(context)
|
||||
.pushNamed(Routes.wyre, arguments: url);
|
||||
walletViewModel.isRunningWebView = false;
|
||||
} catch(e) {
|
||||
print(e.toString());
|
||||
walletViewModel.isRunningWebView = false;
|
||||
}
|
||||
})
|
||||
],
|
||||
)),
|
||||
if (walletViewModel.type == WalletType.bitcoin) ActionButton(
|
||||
image: buyImage,
|
||||
title: S.of(context).buy,
|
||||
onClick: () {
|
||||
Navigator.of(context).pushNamed(Routes.preOrder);
|
||||
},
|
||||
),
|
||||
],
|
||||
)),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user