@stellar-expert/tx-meta-effects-parser 9.0.0 → 9.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/effects-analyzer.js +11 -2
package/package.json
CHANGED
package/src/effects-analyzer.js
CHANGED
|
@@ -1048,8 +1048,17 @@ class EffectsAnalyzer {
|
|
|
1048
1048
|
retrieveOpContractId() {
|
|
1049
1049
|
const funcValue = this.operation.func._value._attributes
|
|
1050
1050
|
if (funcValue) {
|
|
1051
|
-
if (funcValue.contractAddress)
|
|
1052
|
-
|
|
1051
|
+
if (funcValue.contractAddress) {
|
|
1052
|
+
let raw = funcValue.contractAddress._value
|
|
1053
|
+
switch (raw._arm) {
|
|
1054
|
+
case 'ed25519':
|
|
1055
|
+
return StrKey.encodeContract(raw._value)
|
|
1056
|
+
case undefined:
|
|
1057
|
+
return StrKey.encodeContract(raw)
|
|
1058
|
+
default:
|
|
1059
|
+
throw new Error(`Unsupported contract address type: ${raw._arm}`)
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1053
1062
|
const preimage = funcValue.contractIdPreimage
|
|
1054
1063
|
if (preimage)
|
|
1055
1064
|
return contractIdFromPreimage(preimage, this.network)
|