Update sideshift plugin with new optional API fields#218
Open
j0ntz wants to merge 1 commit into
Open
Conversation
Sideshift's API now returns optional settledAt, deposit/settle contract addresses, deposit/settle hashes, and deposit/settle EVM chain IDs. Capture these in the asSideshiftTx cleaner and wire depositTxid/payoutTxid from the new deposit/settle hashes. The remaining new fields are available on rawTx. Recreates #208 (external fork PR) onto current master.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
noneDescription
Recreates external fork PR #208 ("Update sideshift plugin") on a fresh branch off current
master. The original PR is from a fork (popfendi) and is in aCONFLICTINGstate becausemasterevolved since it was opened (theStandardTxshape and theasSideshiftTxcleaner both gained fields). This re-applies the partner's change cleanly onto currentmaster.Sideshift's API now returns additional optional fields:
settledAt,depositContractAddress,settleContractAddress,depositHash,settleHash,depositEvmChainId,settleEvmChainId. This change:asSideshiftTxcleaner (asOptional).depositTxidfromtx.depositHashandpayoutTxidfromtx.settleHashinprocessSideshiftTx.Per the partner's note, the remaining new fields (contract addresses, EVM chain IDs,
settledAt) are intentionally captured onrawTxfor use where needed and are not yet mapped toStandardTxoutput.Asana: https://app.asana.com/0/1215088146871429/1214638405678783
Testing
npm run build.types(tsc),npm run build.lib, andnpm run build.distpass with the change (verified locally vianpm run prepare; only thesetupstep, which requires a live CouchDB, could not run in the agent sandbox).Note
Low Risk
Optional API parsing and txid mapping in a single partner plugin; no auth or shared infrastructure changes.
Overview
Extends the SideShift partner plugin to accept new optional fields from SideShift’s API (
depositHash,settleHash, contract addresses, EVM chain IDs,settledAt) in theasSideshiftTxcleaner.Behavior change:
processSideshiftTxnow setsdepositTxidandpayoutTxidonStandardTxfromdepositHashandsettleHashinstead of leaving them undefined. Contract addresses, EVM chain IDs, andsettledAtremain onrawTxonly (not mapped toStandardTxyet).Reviewed by Cursor Bugbot for commit d461bee. Bugbot is set up for automated code reviews on this repo. Configure here.