diff --git a/src/main/kotlin/dev/solsynth/snConnect/commands/SnCommand.kt b/src/main/kotlin/dev/solsynth/snConnect/commands/SnCommand.kt index 7261291..f3d06f9 100644 --- a/src/main/kotlin/dev/solsynth/snConnect/commands/SnCommand.kt +++ b/src/main/kotlin/dev/solsynth/snConnect/commands/SnCommand.kt @@ -187,15 +187,11 @@ class SnCommand( try { val transactionSrv = SnBalanceService(sn); - val transaction = transactionSrv.addBalance(amount, "Withdraw from GoatCraft", accountId); + transactionSrv.addBalance(amount, "Withdraw from GoatCraft", accountId); val transactionHintComponent = TextComponent( ChatColor.GREEN.toString() + (messages["command_withdraw_done"] - ?: "Done! transaction number ") + ChatColor.WHITE + ChatColor.BOLD + "#${ - transaction.id.take( - 6 - ) - }" + ?: "Done! ") ) p0.playSound(p0.player!!, Sound.BLOCK_ANVIL_PLACE, 1.0F, 1.0F) diff --git a/src/main/kotlin/dev/solsynth/snConnect/services/SnBalanceService.kt b/src/main/kotlin/dev/solsynth/snConnect/services/SnBalanceService.kt index 055b987..d192b81 100644 --- a/src/main/kotlin/dev/solsynth/snConnect/services/SnBalanceService.kt +++ b/src/main/kotlin/dev/solsynth/snConnect/services/SnBalanceService.kt @@ -47,7 +47,7 @@ class SnBalanceService(private val sn: SnService) { ignoreUnknownKeys = true } - fun addBalance(amount: Double, remark: String, accountID: String): SnTransaction { + fun addBalance(amount: Double, remark: String, accountID: String) { val body = SnTransactionRequest( amount = amount, remark = remark, @@ -65,10 +65,6 @@ class SnBalanceService(private val sn: SnService) { sn.client.newCall(request).execute().use { response -> if (!response.isSuccessful) throw IOException("Unexpected code $response") - val responseBody = response.body!!.string() - val out = json.decodeFromString(responseBody) - - return out } } }