@@ -76,11 +76,8 @@ public static string GetPaymentUri(MoneroTxConfig? config)
7676 sb . Append ( config . GetAddress ( ) ) ;
7777
7878 StringBuilder paramSb = new ( ) ;
79- ulong ? amount = config . GetAmount ( ) ;
80- if ( amount != null )
81- {
82- paramSb . Append ( "&tx_amount=" ) . Append ( MoneroUtils . AtomicUnitsToXmr ( ( ulong ) amount ) ) ;
83- }
79+ long amount = config . GetAmount ( ) ;
80+ paramSb . Append ( "&tx_amount=" ) . Append ( MoneroUtils . AtomicUnitsToXmr ( ( ulong ) amount ) ) ;
8481
8582 if ( ! string . IsNullOrEmpty ( config . GetRecipientName ( ) ) )
8683 {
@@ -139,7 +136,7 @@ public MoneroTxConfig SetAddress(string address)
139136 return _destinations [ 0 ] . Address ;
140137 }
141138
142- public MoneroTxConfig SetAmount ( ulong amount )
139+ public MoneroTxConfig SetAmount ( long amount )
143140 {
144141 if ( _destinations != null && _destinations . Count > 1 )
145142 {
@@ -160,11 +157,11 @@ public MoneroTxConfig SetAmount(ulong amount)
160157
161158 public MoneroTxConfig SetAmount ( string amount )
162159 {
163- return SetAmount ( ulong . Parse ( amount ) ) ;
160+ return SetAmount ( long . Parse ( amount ) ) ;
164161 }
165162
166163
167- public ulong ? GetAmount ( )
164+ public long GetAmount ( )
168165 {
169166 if ( _destinations == null || _destinations . Count != 1 )
170167 {
@@ -174,7 +171,7 @@ public MoneroTxConfig SetAmount(string amount)
174171 return _destinations [ 0 ] . Amount ;
175172 }
176173
177- public MoneroTxConfig AddDestination ( string address , ulong amount )
174+ public MoneroTxConfig AddDestination ( string address , long amount )
178175 {
179176 return AddDestination ( new TransferDestination { Address = address , Amount = amount } ) ;
180177 }
0 commit comments