Skip to content

Commit

Permalink
added in case failed to connect (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
donpui authored Sep 26, 2022
1 parent 87b884e commit d1d1af4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/views/shared/receive.dart
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ class ReceiveSharedState extends ChangeNotifier {
this.errorTitle = OOPS;
this.error = ERR_CONNECTION_REFUSED;
break;
case ErrCodeGenerationFailed:
this.errorTitle = OOPS;
this.error = ERR_CONNECTION_REFUSED;
break;
default:
this.errorTitle = SOMETHING_WENT_WRONG;
// TODO: map error to user friendly name
Expand Down
4 changes: 4 additions & 0 deletions lib/views/shared/send.dart
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ class SendSharedState extends ChangeNotifier {
this.errorTitle = OOPS;
this.error = ERR_CONNECTION_REFUSED;
break;
case ErrCodeGenerationFailed:
this.errorTitle = OOPS;
this.error = ERR_CONNECTION_REFUSED;
break;
default:
this.errorTitle = SOMETHING_WENT_WRONG;
// TODO: map error to user friendly name (case invalid nameplate)
Expand Down

0 comments on commit d1d1af4

Please sign in to comment.