Skip to content

Commit

Permalink
refactor: rename chain swap response properties
Browse files Browse the repository at this point in the history
  • Loading branch information
michael1011 committed Mar 26, 2024
1 parent 25ef8dd commit 6b8ba97
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions lib/service/Service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1742,13 +1742,13 @@ class Service {
this.eventHandler.emitSwapCreation(res.id);
return {
id: res.id,
serverDetails: res.serverDetails,
userDetails: {
...res.userDetails,
claimDetails: res.claimDetails,
lockupDetails: {
...res.lockupDetails,
bip21: this.paymentRequestUtils.encodeBip21(
receivingCurrency.symbol,
res.userDetails.lockupAddress,
res.userDetails.amount,
res.lockupDetails.lockupAddress,
res.lockupDetails.amount,
getSwapMemo(sendingCurrency.symbol, SwapType.Chain),
),
},
Expand Down
8 changes: 4 additions & 4 deletions lib/swap/SwapManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ type CreatedChainSwapDetails = Omit<CreatedOnchainSwap, 'refundPublicKey'> & {
type CreatedChainSwap = {
id: string;

userDetails: CreatedChainSwapDetails;
serverDetails: CreatedChainSwapDetails;
claimDetails: CreatedChainSwapDetails;
lockupDetails: CreatedChainSwapDetails;
};

class SwapManager {
Expand Down Expand Up @@ -1084,8 +1084,8 @@ class SwapManager {

return {
id,
userDetails: serializeDetails(receivingData),
serverDetails: serializeDetails(sendingData),
claimDetails: serializeDetails(sendingData),
lockupDetails: serializeDetails(receivingData),
};
};

Expand Down

0 comments on commit 6b8ba97

Please sign in to comment.