Handling edge-case for when no vesting accounts exist (#2888)

This commit is contained in:
Jędrzej Stuczyński
2023-01-23 11:58:07 +01:00
committed by GitHub
parent b2ed078e0f
commit a693fa9190
+3
View File
@@ -189,6 +189,9 @@ impl Client {
.nyxd
.query_contract_raw(vesting_contract, b"key".to_vec())
.await?;
if res.is_empty() {
return Ok(0);
}
Ok(serde_json::from_slice(&res).map_err(NyxdError::from)?)
}