libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit 759783e16f9d227a040b528d44a0b6900e59d112
parent a58a9c2258d547a280b961436eb330a63230fa1e
Author: Florian Dold <florian.dold@gmail.com>
Date:   Wed, 10 Jun 2020 11:59:56 +0530

remove unnecessary check (DB should complain there)

Diffstat:
Mnexus/src/main/kotlin/tech/libeufin/nexus/DB.kt | 17+----------------
1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/DB.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/DB.kt @@ -64,22 +64,7 @@ object TalerIncomingPayments : LongIdTable() { } class TalerIncomingPaymentEntity(id: EntityID<Long>) : LongEntity(id) { - companion object : LongEntityClass<TalerIncomingPaymentEntity>(TalerIncomingPayments) { - override fun new(init: TalerIncomingPaymentEntity.() -> Unit): TalerIncomingPaymentEntity { - val newRow = super.new(init) - /** - * In case the exchange asks for all the values strictly lesser than MAX_VALUE, - * it would lose the row whose id == MAX_VALUE. So the check below makes this - * situation impossible by disallowing MAX_VALUE as a id value. - */ - if (newRow.id.value == Long.MAX_VALUE) { - throw NexusError( - HttpStatusCode.InsufficientStorage, "Cannot store rows anymore" - ) - } - return newRow - } - } + companion object : LongEntityClass<TalerIncomingPaymentEntity>(TalerIncomingPayments) var payment by RawBankTransactionEntity referencedOn TalerIncomingPayments.payment var valid by TalerIncomingPayments.valid var refunded by TalerIncomingPayments.refunded