Skip to content

Commit f756b6b

Browse files
committed
Add chainId, pluginId, and tokenId fields to StandardTx
Have all plugins just set to undefined for now
1 parent ac0d516 commit f756b6b

34 files changed

Lines changed: 222 additions & 2 deletions

src/partners/banxa.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,13 +276,19 @@ export function processBanxaTx(rawTx: unknown): StandardTx {
276276
depositTxid: undefined,
277277
depositAddress: undefined,
278278
depositCurrency: inputCurrency,
279+
depositChainPluginId: undefined,
280+
depositEvmChainId: undefined,
281+
depositTokenId: undefined,
279282
depositAmount: inputAmount,
280283
direction,
281284
exchangeType: 'fiat',
282285
paymentType,
283286
payoutTxid: undefined,
284287
payoutAddress,
285288
payoutCurrency: outputCurrency,
289+
payoutChainPluginId: undefined,
290+
payoutEvmChainId: undefined,
291+
payoutTokenId: undefined,
286292
payoutAmount: outputAmount,
287293
timestamp,
288294
isoDate,

src/partners/bitaccess.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,19 @@ export function processBitaccessTx(rawTx: unknown): StandardTx {
145145
depositTxid,
146146
depositAddress: tx.deposit_address,
147147
depositCurrency: tx.deposit_currency.toUpperCase(),
148+
depositChainPluginId: undefined,
149+
depositEvmChainId: undefined,
150+
depositTokenId: undefined,
148151
depositAmount: tx.deposit_amount,
149152
direction: tx.trade_type,
150153
exchangeType: 'fiat',
151154
paymentType: 'cash',
152155
payoutTxid,
153156
payoutAddress: tx.withdrawal_address,
154157
payoutCurrency: tx.withdrawal_currency.toUpperCase(),
158+
payoutChainPluginId: undefined,
159+
payoutEvmChainId: undefined,
160+
payoutTokenId: undefined,
155161
payoutAmount: tx.withdrawal_amount,
156162
timestamp,
157163
isoDate: tx.updated_at,

src/partners/bitrefill.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,19 @@ export function processBitrefillTx(rawTx: unknown): StandardTx {
151151
depositTxid: undefined,
152152
depositAddress: undefined,
153153
depositCurrency: inputCurrency,
154+
depositChainPluginId: undefined,
155+
depositEvmChainId: undefined,
156+
depositTokenId: undefined,
154157
depositAmount,
155158
direction: 'sell',
156159
exchangeType: 'fiat',
157160
paymentType: 'giftcard',
158161
payoutTxid: undefined,
159162
payoutAddress: undefined,
160163
payoutCurrency: tx.currency,
164+
payoutChainPluginId: undefined,
165+
payoutEvmChainId: undefined,
166+
payoutTokenId: undefined,
161167
payoutAmount: parseInt(tx.value),
162168
timestamp,
163169
isoDate: new Date(tx.invoiceTime).toISOString(),

src/partners/bitsofgold.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,19 @@ export function processBitsOfGoldTx(rawTx: unknown): StandardTx {
127127
depositTxid: undefined,
128128
depositAddress: undefined,
129129
depositCurrency,
130+
depositChainPluginId: undefined,
131+
depositEvmChainId: undefined,
132+
depositTokenId: undefined,
130133
depositAmount,
131134
direction,
132135
exchangeType: 'fiat',
133136
paymentType: data.fiat_type === 'ILS' ? 'israelibank' : 'sepa',
134137
payoutTxid: undefined,
135138
payoutAddress: undefined,
136139
payoutCurrency,
140+
payoutChainPluginId: undefined,
141+
payoutEvmChainId: undefined,
142+
payoutTokenId: undefined,
137143
payoutAmount,
138144
timestamp: timestamp / 1000,
139145
isoDate: date.toISOString(),

src/partners/bity.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,19 @@ export function processBityTx(rawTx: unknown): StandardTx {
177177
depositTxid: undefined,
178178
depositAddress: undefined,
179179
depositCurrency: tx.input.currency.toUpperCase(),
180+
depositChainPluginId: undefined,
181+
depositEvmChainId: undefined,
182+
depositTokenId: undefined,
180183
depositAmount: safeParseFloat(tx.input.amount),
181184
direction,
182185
exchangeType: 'fiat',
183186
paymentType: 'sepa',
184187
payoutTxid: undefined,
185188
payoutAddress: undefined,
186189
payoutCurrency: tx.output.currency.toUpperCase(),
190+
payoutChainPluginId: undefined,
191+
payoutEvmChainId: undefined,
192+
payoutTokenId: undefined,
187193
payoutAmount: safeParseFloat(tx.output.amount),
188194
timestamp: Date.parse(tx.timestamp_created.concat('Z')) / 1000,
189195
isoDate: new Date(tx.timestamp_created.concat('Z')).toISOString(),

src/partners/changehero.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,19 @@ export function processChangeHeroTx(rawTx: unknown): StandardTx {
168168
depositTxid: tx.payinHash,
169169
depositAddress: tx.payinAddress,
170170
depositCurrency: tx.currencyFrom.toUpperCase(),
171+
depositChainPluginId: undefined,
172+
depositEvmChainId: undefined,
173+
depositTokenId: undefined,
171174
depositAmount: safeParseFloat(tx.amountFrom),
172175
direction: null,
173176
exchangeType: 'swap',
174177
paymentType: null,
175178
payoutTxid: tx.payoutHash,
176179
payoutAddress: tx.payoutAddress,
177180
payoutCurrency: tx.currencyTo.toUpperCase(),
181+
payoutChainPluginId: undefined,
182+
payoutEvmChainId: undefined,
183+
payoutTokenId: undefined,
178184
payoutAmount: safeParseFloat(tx.amountTo),
179185
timestamp: tx.createdAt,
180186
isoDate: smartIsoDateFromTimestamp(tx.createdAt).isoDate,

src/partners/changelly.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,19 @@ export function processChangellyTx(rawTx: unknown): StandardTx {
180180
depositTxid: tx.payinHash,
181181
depositAddress: tx.payinAddress,
182182
depositCurrency: tx.currencyFrom.toUpperCase(),
183+
depositChainPluginId: undefined,
184+
depositEvmChainId: undefined,
185+
depositTokenId: undefined,
183186
depositAmount: safeParseFloat(tx.amountFrom),
184187
direction: null,
185188
exchangeType: 'swap',
186189
paymentType: null,
187190
payoutTxid: tx.payoutHash,
188191
payoutAddress: tx.payoutAddress,
189192
payoutCurrency: tx.currencyTo.toUpperCase(),
193+
payoutChainPluginId: undefined,
194+
payoutEvmChainId: undefined,
195+
payoutTokenId: undefined,
190196
payoutAmount: safeParseFloat(tx.amountTo),
191197
timestamp: tx.createdAt,
192198
isoDate: new Date(tx.createdAt * 1000).toISOString(),

src/partners/changenow.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,19 @@ export function processChangeNowTx(rawTx: unknown): StandardTx {
151151
depositTxid: tx.payin.hash,
152152
depositAddress: tx.payin.address,
153153
depositCurrency: tx.payin.currency.toUpperCase(),
154+
depositChainPluginId: undefined,
155+
depositEvmChainId: undefined,
156+
depositTokenId: undefined,
154157
depositAmount: tx.payin.amount ?? tx.payin.expectedAmount ?? 0,
155158
direction: null,
156159
exchangeType: 'swap',
157160
paymentType: null,
158161
payoutTxid: tx.payout.hash,
159162
payoutAddress: tx.payout.address,
160163
payoutCurrency: tx.payout.currency.toUpperCase(),
164+
payoutChainPluginId: undefined,
165+
payoutEvmChainId: undefined,
166+
payoutTokenId: undefined,
161167
payoutAmount: tx.payout.amount ?? tx.payout.expectedAmount ?? 0,
162168
timestamp,
163169
isoDate: date.toISOString(),

src/partners/coinswitch.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,19 @@ export function processCoinSwitchTx(rawTx: unknown): StandardTx {
117117
depositTxid,
118118
depositAddress: tx.exchangeAddress.address,
119119
depositCurrency: tx.depositCoin.toUpperCase(),
120+
depositChainPluginId: undefined,
121+
depositEvmChainId: undefined,
122+
depositTokenId: undefined,
120123
depositAmount: tx.depositCoinAmount,
121124
direction: null,
122125
exchangeType: 'swap',
123126
paymentType: null,
124127
payoutTxid,
125128
payoutAddress: tx.destinationAddress.address,
126129
payoutCurrency: tx.destinationCoin.toUpperCase(),
130+
payoutChainPluginId: undefined,
131+
payoutEvmChainId: undefined,
132+
payoutTokenId: undefined,
127133
payoutAmount: tx.destinationCoinAmount,
128134
timestamp: tx.createdAt / 1000,
129135
isoDate: new Date(tx.createdAt).toISOString(),

src/partners/exolix.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,19 @@ export function processExolixTx(rawTx: unknown): StandardTx {
175175
depositTxid: tx.hashIn?.hash ?? '',
176176
depositAddress: tx.depositAddress,
177177
depositCurrency: tx.coinFrom.coinCode,
178+
depositChainPluginId: undefined,
179+
depositEvmChainId: undefined,
180+
depositTokenId: undefined,
178181
depositAmount: tx.amount,
179182
direction: null,
180183
exchangeType: 'swap',
181184
paymentType: null,
182185
payoutTxid: tx.hashOut?.hash ?? '',
183186
payoutAddress: tx.withdrawalAddress,
184187
payoutCurrency: tx.coinTo.coinCode,
188+
payoutChainPluginId: undefined,
189+
payoutEvmChainId: undefined,
190+
payoutTokenId: undefined,
185191
payoutAmount: tx.amountTo,
186192
timestamp,
187193
isoDate,

0 commit comments

Comments
 (0)