Skip to content

Commit

Permalink
Fix eslint whining
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaptic committed Jan 16, 2025
1 parent 2678518 commit e77bb26
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/scval.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,14 +379,14 @@ export function scValToNative(scv) {

/// Inject a sortable map builder into the xdr module.
xdr.scvSortedMap = (items) => {
let sorted = Array.from(items).sort((a, b) => {
const sorted = Array.from(items).sort((a, b) => {
// Both a and b are `ScMapEntry`s, so we need to sort by underlying key.
//
// We couldn't possibly handle every combination of keys since Soroban
// maps don't enforce consistent types, so we do a best-effort and try
// sorting by "number-like" or "string-like."
let nativeA = scValToNative(a.key()),
nativeB = scValToNative(b.key());
const nativeA = scValToNative(a.key());
const nativeB = scValToNative(b.key());

switch (typeof nativeA) {
case 'number':
Expand Down

0 comments on commit e77bb26

Please sign in to comment.