Skip to content

Commit 424c35c

Browse files
committed
decode event as base64
1 parent 7ee348b commit 424c35c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

packages/cli/src/support/cosmos.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,21 @@ pub trait ResponseValuePicker {
2121

2222
impl ResponseValuePicker for TxCommitResponse {
2323
fn pick(&self, event: &str, attribute: &str) -> String {
24-
self.deliver_tx
24+
let value = self
25+
.deliver_tx
2526
.events
2627
.iter()
2728
.find(|e| e.kind == event)
2829
.unwrap()
2930
.attributes
3031
.iter()
31-
.find(|a| a.key == attribute)
32+
.find(|a| a.key == base64::encode(attribute))
3233
.unwrap()
3334
.value
34-
.clone()
35+
.clone();
36+
37+
let value_bytes = base64::decode(value).unwrap();
38+
String::from_utf8(value_bytes).unwrap()
3539
}
3640
}
3741

0 commit comments

Comments
 (0)