From deda14efe2f7e9d0c9c0a93a94f6ad5e8864ba9a Mon Sep 17 00:00:00 2001 From: apporc Date: Mon, 18 Mar 2024 19:40:45 +0800 Subject: [PATCH] Fix MockSession fileUrl 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 --- Sources/EOSIO/API/Client.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/EOSIO/API/Client.swift b/Sources/EOSIO/API/Client.swift index 3f08ee7..1e54c03 100644 --- a/Sources/EOSIO/API/Client.swift +++ b/Sources/EOSIO/API/Client.swift @@ -251,6 +251,7 @@ extension Client { encoder.dataEncodingStrategy = self.dataEncoder encoder.dateEncodingStrategy = self.dateEncoder encoder.keyEncodingStrategy = .convertToSnakeCase + encoder.outputFormatting = .sortedKeys return encoder } }