Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/utils/ConnectorUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ export function sortConnectorsByExplorerWallet(

/**
* Example function that demonstrates the corrected approach
* This function avoids the unnecessary spread operation
* This function shows the proper way to use sortConnectorsByExplorerWallet without
* adding unnecessary spread operations, since the base function already creates a copy internally
*/
export function sortConnectorsWithoutUnnecessarySpread(
connectors: Connector[],
): Connector[] {
// No unnecessary spread operation; sortConnectorsByExplorerWallet already creates a copy
// Correct approach: call sortConnectorsByExplorerWallet directly
// No additional spread operation needed since the function already creates a copy
const sorted = sortConnectorsByExplorerWallet(connectors)
return sorted
}
Expand Down