Skip to content

Commit

Permalink
chore: modify the createat type of LegacyKeystoreResult to string
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoguang1010 committed Mar 21, 2024
1 parent a5585ff commit 03022dc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion token-core/tcx-proto/src/params.proto
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ message MigrateKeystoreParam {
string id = 1;
string name = 2;
string source = 3;
int64 createdAt = 4;
string createdAt = 4;
repeated AccountResponse accounts = 5;
}

Expand Down
4 changes: 2 additions & 2 deletions token-core/tcx/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -677,8 +677,8 @@ pub struct LegacyKeystoreResult {
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub source: ::prost::alloc::string::String,
#[prost(int64, tag = "4")]
pub created_at: i64,
#[prost(string, tag = "4")]
pub created_at: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "5")]
pub accounts: ::prost::alloc::vec::Vec<AccountResponse>,
}
Expand Down
4 changes: 2 additions & 2 deletions token-core/tcx/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ fn parse_legacy_kesytore(contents: String) -> Result<LegacyKeystoreResult> {
id: legacy_keystore.id.to_string(),
name: meta.name.to_string(),
source: meta.source.as_ref().unwrap_or(&"".to_string()).to_string(),
created_at,
created_at: created_at.to_string(),
accounts: vec![account],
};
Ok(keystore_result)
Expand Down Expand Up @@ -379,7 +379,7 @@ fn parse_tcx_keystore(v: &Value) -> Result<LegacyKeystoreResult> {
id,
name: meta.name.to_string(),
source: meta.source.to_string(),
created_at: meta.timestamp,
created_at: meta.timestamp.to_string(),
accounts: account_responses,
};
Ok(keystore_result)
Expand Down

0 comments on commit 03022dc

Please sign in to comment.