Skip to content
This repository has been archived by the owner on Nov 29, 2024. It is now read-only.

Commit

Permalink
fix(operator): changed the base64 path seperator to \ (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
srdtrk authored Oct 14, 2024
1 parent 3d6c5d4 commit abeefae
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion e2e/interchaintestv8/operator/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func ToBase64KeyPaths(paths ...[][]byte) string {
if len(path) != 2 {
panic("path must have 2 elements")
}
keyPaths = append(keyPaths, base64.StdEncoding.EncodeToString(path[0])+"/"+base64.StdEncoding.EncodeToString(path[1]))
keyPaths = append(keyPaths, base64.StdEncoding.EncodeToString(path[0])+"\\"+base64.StdEncoding.EncodeToString(path[1]))
}
return strings.Join(keyPaths, ",")
}
Expand Down
2 changes: 1 addition & 1 deletion operator/src/cli/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ pub mod fixtures {
pub trust_options: super::TrustOptions,

/// Indicates that the key paths are base64 encoded.
/// Module store keys seperated by '/', eg. 'aWJj/a2V5' for 'ibc/key'.
/// Module store keys seperated by backslash, '\', eg. 'aWJj\a2V5' for 'ibc/key'.
#[clap(long)]
pub base64: bool,
}
Expand Down
2 changes: 1 addition & 1 deletion operator/src/runners/fixtures/membership.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pub async fn run(args: MembershipCmd) -> anyhow::Result<()> {
let kv_proofs: Vec<(Vec<Vec<u8>>, Vec<u8>, MerkleProof)> =
futures::future::try_join_all(args.key_paths.into_iter().map(|path| async {
let path: Vec<Vec<u8>> = if args.base64 {
path.split('/')
path.split('\\')
.map(subtle_encoding::base64::decode)
.collect::<Result<_, _>>()?
} else {
Expand Down
2 changes: 1 addition & 1 deletion operator/src/runners/fixtures/uc_and_mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ pub async fn run(args: UpdateClientAndMembershipCmd) -> anyhow::Result<()> {
let kv_proofs: Vec<(Vec<Vec<u8>>, Vec<u8>, MerkleProof)> =
futures::future::try_join_all(args.membership.key_paths.into_iter().map(|path| async {
let path: Vec<Vec<u8>> = if args.membership.base64 {
path.split('/')
path.split('\\')
.map(subtle_encoding::base64::decode)
.collect::<Result<_, _>>()?
} else {
Expand Down

0 comments on commit abeefae

Please sign in to comment.