Skip to content

Commit 187be6c

Browse files
Marzooqabitgobot
authored andcommitted
fix(sdk-core): fix line length for prettier compliance
Extract symbol and tokenName locals so the tokenName spread stays within the 120-char printWidth configured in .prettierrc.yml. References: WCI-1110 Session-Id: 94a72c0d-fce8-4672-a6a4-26df25a64dfc Task-Id: 76f4312b-c52c-4478-94f6-457913e8c0b7
1 parent fff9cd3 commit 187be6c

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

modules/sdk-core/src/bitgo/utils/tss/recipientUtils.ts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,19 @@ export function resolveEffectiveTxParams(
119119
txParams: TransactionParams | undefined,
120120
chainName?: string
121121
): TransactionParams {
122-
const intentRecipients = (txRequest.intent as PopulatedIntent)?.recipients?.map((intentRecipient) => ({
123-
address: intentRecipient.address.address,
124-
amount: intentRecipient.amount.value,
125-
data: intentRecipient.data,
122+
const intentRecipients = (txRequest.intent as PopulatedIntent)?.recipients?.map((intentRecipient) => {
126123
// Prefer structured tokenData.tokenName; fall back to amount.symbol when truthy and
127124
// different from the native chain symbol — identical to txParamsFromIntent's logic.
128-
...(intentRecipient.tokenData?.tokenName
129-
? { tokenName: intentRecipient.tokenData.tokenName }
130-
: intentRecipient.amount.symbol && intentRecipient.amount.symbol !== chainName && { tokenName: intentRecipient.amount.symbol }),
131-
}));
125+
const { symbol } = intentRecipient.amount;
126+
const tokenName =
127+
intentRecipient.tokenData?.tokenName || (symbol && symbol !== chainName ? symbol : undefined);
128+
return {
129+
address: intentRecipient.address.address,
130+
amount: intentRecipient.amount.value,
131+
data: intentRecipient.data,
132+
...(tokenName && { tokenName }),
133+
};
134+
});
132135

133136
const effectiveTxParams: TransactionParams = {
134137
...txParams,

0 commit comments

Comments
 (0)