From f1ea6bcbc1469ca01a823a5f7060819ea02b30a4 Mon Sep 17 00:00:00 2001 From: jeremy lee Date: Wed, 19 Jun 2024 16:38:16 -0400 Subject: [PATCH] address comment --- .../processor/router/skip/SkipRoutePayloadProcessor.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipRoutePayloadProcessor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipRoutePayloadProcessor.kt index 4c141213d..d9f057eb4 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipRoutePayloadProcessor.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/processor/router/skip/SkipRoutePayloadProcessor.kt @@ -51,8 +51,8 @@ internal class SkipRoutePayloadProcessor(parser: ParserProtocol) : BaseProcessor ): Map { val txType = getTxType(payload) val modified = transform(existing, payload, keyMap) - val data = modified.get("data") - if (data != null && txType == TxType.EVM) { + val data = modified["data"] ?: return modified + if (txType == TxType.EVM) { // skip does not provide the 0x prefix. it's not required but is good for clarity // and keeps our typing honest (we typecast this value to evmAddress in web) modified.safeSet("data", "0x$data")