Skip to content

Commit

Permalink
Fix MockSession fileUrl
Browse files Browse the repository at this point in the history
Issue is: now fileUrl generate random file urls for the same request,
cause the digest of request body is random.

There is a breaking change in swift Foundation's JSONEncoder,
sortedKeys needed now.

For detail, check here: https://developer.apple.com/forums/thread/735895
  • Loading branch information
apporc committed Mar 18, 2024
1 parent b68f24e commit deda14e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/EOSIO/API/Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ extension Client {
encoder.dataEncodingStrategy = self.dataEncoder
encoder.dateEncodingStrategy = self.dateEncoder
encoder.keyEncodingStrategy = .convertToSnakeCase
encoder.outputFormatting = .sortedKeys
return encoder
}
}
Expand Down

0 comments on commit deda14e

Please sign in to comment.