File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
backend/src/modules/smartcontract/services Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -215,6 +215,8 @@ export class ContractService {
215
215
216
216
const balance = await this . getWalletBalance ( walletAddress ) ;
217
217
218
+ console . log ( `Wallet: ${ walletAddress } , Balance: ` , balance )
219
+
218
220
if ( balance < this . faucetAmount ) {
219
221
const amountToSend = this . faucetAmount - balance ;
220
222
@@ -242,12 +244,14 @@ export class ContractService {
242
244
}
243
245
244
246
return `Success: Topped up ${ amountToSend } FDS to ${ walletAddress } .` ;
247
+ } else {
248
+ throw new GeneralException (
249
+ ErrorTypeEnum . INTERNAL_SERVER_ERROR ,
250
+ `already has a balance of ${ this . faucetAmount } FDS or more.` ,
251
+ ) ;
245
252
}
246
253
247
- throw new GeneralException (
248
- ErrorTypeEnum . INTERNAL_SERVER_ERROR ,
249
- `already has a balance of ${ this . faucetAmount } FDS or more.` ,
250
- ) ;
254
+
251
255
}
252
256
253
257
async shareDevice (
You can’t perform that action at this time.
0 commit comments