From dfce3aa9ce1fe6d23aed4027aa4cddf9429a49c9 Mon Sep 17 00:00:00 2001 From: Linus Kendall Date: Thu, 22 Jun 2023 01:02:37 +0530 Subject: [PATCH] Fix before/after cursors. (#67) (#77) Co-authored-by: Richard Wu --- das_api/src/api/api_impl.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/das_api/src/api/api_impl.rs b/das_api/src/api/api_impl.rs index daa4fa81a..b0d9746fb 100644 --- a/das_api/src/api/api_impl.rs +++ b/das_api/src/api/api_impl.rs @@ -146,8 +146,8 @@ impl ApiContract for DasApi { sort_by, limit.map(|x| x as u64).unwrap_or(1000), page.map(|x| x as u64), - before.map(|x| x.as_bytes().to_vec()), - after.map(|x| x.as_bytes().to_vec()), + before.map(|x| bs58::decode(x).into_vec().unwrap_or_default()), + after.map(|x| bs58::decode(x).into_vec().unwrap_or_default()), ) .await .map_err(Into::into) @@ -177,8 +177,8 @@ impl ApiContract for DasApi { sort_by, limit.map(|x| x as u64).unwrap_or(1000), page.map(|x| x as u64), - before.map(|x| x.as_bytes().to_vec()), - after.map(|x| x.as_bytes().to_vec()), + before.map(|x| bs58::decode(x).into_vec().unwrap_or_default()), + after.map(|x| bs58::decode(x).into_vec().unwrap_or_default()), ) .await .map_err(Into::into) @@ -210,8 +210,8 @@ impl ApiContract for DasApi { sort_by, limit.map(|x| x as u64).unwrap_or(1000), page.map(|x| x as u64), - before.map(|x| x.as_bytes().to_vec()), - after.map(|x| x.as_bytes().to_vec()), + before.map(|x| bs58::decode(x).into_vec().unwrap_or_default()), + after.map(|x| bs58::decode(x).into_vec().unwrap_or_default()), ) .await .map_err(Into::into) @@ -240,8 +240,8 @@ impl ApiContract for DasApi { sort_by, limit.map(|x| x as u64).unwrap_or(1000), page.map(|x| x as u64), - before.map(|x| x.as_bytes().to_vec()), - after.map(|x| x.as_bytes().to_vec()), + before.map(|x| bs58::decode(x).into_vec().unwrap_or_default()), + after.map(|x| bs58::decode(x).into_vec().unwrap_or_default()), ) .await .map_err(Into::into) @@ -333,8 +333,8 @@ impl ApiContract for DasApi { sort_by, limit.map(|x| x as u64).unwrap_or(1000), page.map(|x| x as u64), - before.map(|x| x.as_bytes().to_vec()), - after.map(|x| x.as_bytes().to_vec()), + before.map(|x| bs58::decode(x).into_vec().unwrap_or_default()), + after.map(|x| bs58::decode(x).into_vec().unwrap_or_default()), ) .await .map_err(Into::into)