Fix wormhole message parsing

This commit is contained in:
Ali Behjati 2023-05-24 18:50:02 +02:00 committed by Reisen
parent fca22a5b2e
commit 15e35aa300
1 changed files with 2 additions and 1 deletions

View File

@ -71,7 +71,8 @@ impl Store {
pub async fn store_update(&self, update: Update) -> Result<()> {
let slot = match update {
Update::Vaa(vaa_bytes) => {
let vaa = serde_wormhole::from_slice::<Vaa<Vec<u8>>>(&vaa_bytes)?;
let vaa =
serde_wormhole::from_slice::<Vaa<&serde_wormhole::RawMessage>>(&vaa_bytes)?;
let payload = WormholePayload::try_from_bytes(&vaa.payload, &vaa_bytes)?;
// FIXME: Validate the VAA