File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -114,10 +114,20 @@ patch_private_key_calls() {
114114 local f1=" $base /Sources/SSFTransferService/WalletConnectTransferServiceAssembly.swift"
115115 local f2=" $base /Sources/SSFTransferService/InternalServices/Ethereum/EthereumTransferServiceAssembly.swift"
116116 if [[ -f " $f1 " ]]; then
117+ # Strict replacement
117118 /usr/bin/sed -i ' ' -e ' s/EthereumPrivateKey(privateKey: privateKey\.bytes)/EthereumPrivateKey(privateKey: Array(privateKey))/' " $f1 " || true
119+ # Whitespace-tolerant replacement
120+ /usr/bin/sed -E -i ' ' -e ' s/EthereumPrivateKey\(\s*privateKey:\s*privateKey\s*\.\s*bytes\s*\)/EthereumPrivateKey(privateKey: Array(privateKey))/' " $f1 " || true
121+ # Fallback: replace property access broadly within this file only
122+ /usr/bin/sed -E -i ' ' -e ' s/privateKey\s*\.\s*bytes/Array(privateKey)/g' " $f1 " || true
118123 fi
119124 if [[ -f " $f2 " ]]; then
125+ # Strict replacement
120126 /usr/bin/sed -i ' ' -e ' s/EthereumPrivateKey(privateKey: secretKeyData\.bytes)/EthereumPrivateKey(privateKey: Array(secretKeyData))/' " $f2 " || true
127+ # Whitespace-tolerant replacement
128+ /usr/bin/sed -E -i ' ' -e ' s/EthereumPrivateKey\(\s*privateKey:\s*secretKeyData\s*\.\s*bytes\s*\)/EthereumPrivateKey(privateKey: Array(secretKeyData))/' " $f2 " || true
129+ # Fallback: replace property access broadly within this file only
130+ /usr/bin/sed -E -i ' ' -e ' s/secretKeyData\s*\.\s*bytes/Array(secretKeyData)/g' " $f2 " || true
121131 fi
122132}
123133
You can’t perform that action at this time.
0 commit comments