mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-21 06:18:42 +02:00
Add throwing exception for yat api calls. Remove random address generation on address page.
This commit is contained in:
@@ -27,7 +27,6 @@ class AddressPage extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
addressListViewModel.generateRandomAddress();
|
||||
autorun((_) async {
|
||||
if (!walletViewModel.isOutdatedElectrumWallet
|
||||
|| !walletViewModel.settingsStore.shouldShowReceiveWarning) {
|
||||
|
||||
@@ -66,28 +66,28 @@ class YatSending extends BasePage {
|
||||
color: Colors.black,
|
||||
child: Stack(
|
||||
children: [
|
||||
Center(
|
||||
child:FutureBuilder<String>(
|
||||
future: visualisationForEmojiId(sendViewModel.outputs.first.address),
|
||||
builder: (BuildContext context, AsyncSnapshot<String> snapshot) {
|
||||
switch (snapshot.connectionState) {
|
||||
case ConnectionState.done:
|
||||
if (snapshot.hasError || snapshot.data.isEmpty) {
|
||||
return Image.asset('assets/images/yat_logo.png', width: screenWidth, color: Colors.white);
|
||||
}
|
||||
//Center(
|
||||
// child:FutureBuilder<String>(
|
||||
// future: visualisationForEmojiId(sendViewModel.outputs.first.address),
|
||||
// builder: (BuildContext context, AsyncSnapshot<String> snapshot) {
|
||||
// switch (snapshot.connectionState) {
|
||||
// case ConnectionState.done:
|
||||
// if (snapshot.hasError || snapshot.data.isEmpty) {
|
||||
// return Image.asset('assets/images/yat_logo.png', width: screenWidth, color: Colors.white);
|
||||
// }
|
||||
|
||||
return Image.network(
|
||||
snapshot.data,
|
||||
scale: 0.7,
|
||||
loadingBuilder: (Object z, Widget child, ImageChunkEvent loading)
|
||||
=> loading != null
|
||||
? CupertinoActivityIndicator(animating: true)
|
||||
: child);
|
||||
default:
|
||||
return Image.asset('assets/images/yat_logo.png', width: screenWidth, color: Colors.white);
|
||||
}
|
||||
}),
|
||||
),
|
||||
// return Image.network(
|
||||
// snapshot.data,
|
||||
// scale: 0.7,
|
||||
// loadingBuilder: (Object z, Widget child, ImageChunkEvent loading)
|
||||
// => loading != null
|
||||
// ? CupertinoActivityIndicator(animating: true)
|
||||
// : child);
|
||||
// default:
|
||||
// return Image.asset('assets/images/yat_logo.png', width: screenWidth, color: Colors.white);
|
||||
// }
|
||||
// }),
|
||||
// ),
|
||||
Positioned(
|
||||
bottom: 20,
|
||||
child: Container(
|
||||
|
||||
Reference in New Issue
Block a user