@@ -21,15 +21,10 @@ public class SendViewModel : ViewModelBase
21
21
private string _password ;
22
22
private string _address ;
23
23
private bool _isBusy ;
24
- private string _label ;
24
+ private string _memo ;
25
25
private string _amountText ;
26
26
private CoinListViewModel _coinList ;
27
-
28
- public string Address
29
- {
30
- get => Address ;
31
- set => this . RaiseAndSetIfChanged ( ref _address , value ) ;
32
- }
27
+ private string _warning ;
33
28
34
29
public SendViewModel ( IScreen hostScreen ) : base ( hostScreen )
35
30
{
@@ -72,7 +67,7 @@ public SendViewModel(IScreen hostScreen) : base(hostScreen)
72
67
{
73
68
IsBusy = true ;
74
69
Password = Guard . Correct ( Password ) ;
75
- Label = Label . Trim ( ',' , ' ' ) . Trim ( ) ;
70
+ Memo = Memo . Trim ( ',' , ' ' ) . Trim ( ) ;
76
71
77
72
var selectedCoinViewModels = CoinList . Coins . Where ( cvm => cvm . IsSelected ) ;
78
73
var selectedCoinReferences = selectedCoinViewModels . Select ( cvm => new TxoRef ( cvm . Model . TransactionId , cvm . Model . Index ) ) . ToList ( ) ;
@@ -107,8 +102,8 @@ public SendViewModel(IScreen hostScreen) : base(hostScreen)
107
102
return ;
108
103
}
109
104
110
- var label = Label ;
111
- var operation = new WalletService . Operation ( script , amount , label ) ;
105
+ var memo = Memo ;
106
+ var operation = new WalletService . Operation ( script , amount , memo ) ;
112
107
113
108
var feeTarget = 500 ;
114
109
var result = await Task . Run ( ( ) => Global . WalletService . BuildTransaction ( Password , new [ ] { operation } , feeTarget , allowUnconfirmed : true , allowedInputs : selectedCoinReferences ) ) ;
@@ -131,9 +126,10 @@ public SendViewModel(IScreen hostScreen) : base(hostScreen)
131
126
{
132
127
IsBusy = false ;
133
128
}
134
- } ) ;
129
+ } ,
135
130
this . WhenAny ( x => x . AmountText , x => x . Address , x => x . IsBusy ,
136
- ( amountText , address , busy ) => ! string . IsNullOrWhiteSpace ( amountText . Value ) && ! string . IsNullOrWhiteSpace ( Address ) && ! IsBusy ) ;
131
+ ( amountText , address , busy ) => ! string . IsNullOrWhiteSpace ( amountText . Value ) && ! string . IsNullOrWhiteSpace ( address . Value ) && ! busy . Value )
132
+ . ObserveOn ( RxApp . MainThreadScheduler ) ) ;
137
133
}
138
134
139
135
public string Password
@@ -142,6 +138,11 @@ public string Password
142
138
set => this . RaiseAndSetIfChanged ( ref _password , value ) ;
143
139
}
144
140
141
+ public string Address
142
+ {
143
+ get => _address ;
144
+ set => this . RaiseAndSetIfChanged ( ref _address , value ) ;
145
+ }
145
146
146
147
public bool IsBusy
147
148
{
@@ -155,10 +156,10 @@ public string AmountText
155
156
set => this . RaiseAndSetIfChanged ( ref _amountText , value ) ;
156
157
}
157
158
158
- public string Label
159
+ public string Memo
159
160
{
160
- get => _label ;
161
- set => this . RaiseAndSetIfChanged ( ref _label , value ) ;
161
+ get => _memo ;
162
+ set => this . RaiseAndSetIfChanged ( ref _memo , value ) ;
162
163
}
163
164
164
165
public CoinListViewModel CoinList
0 commit comments