Skip to content

Commit b1c596a

Browse files
committed
Revert "Update contract.service.ts"
This reverts commit c902143.
1 parent c902143 commit b1c596a

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

backend/src/modules/smartcontract/services/contract.service.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,6 @@ export class ContractService {
215215

216216
const balance = await this.getWalletBalance(walletAddress);
217217

218-
console.log(`Wallet: ${walletAddress}, Balance: `, balance)
219-
220218
if (balance < this.faucetAmount) {
221219
const amountToSend = this.faucetAmount - balance;
222220

@@ -244,14 +242,12 @@ export class ContractService {
244242
}
245243

246244
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-
);
252245
}
253246

254-
247+
throw new GeneralException(
248+
ErrorTypeEnum.INTERNAL_SERVER_ERROR,
249+
`already has a balance of ${this.faucetAmount} FDS or more.`,
250+
);
255251
}
256252

257253
async shareDevice(

0 commit comments

Comments
 (0)