From af67e71bfb7f09e240aef3723a5cfb3458c45d1e Mon Sep 17 00:00:00 2001 From: Hendrik Hofstadt Date: Wed, 1 Sep 2021 15:05:59 +0200 Subject: [PATCH] update wrapped asset naming on Solana Change-Id: I0dc2eb3e64d27ee50808dd549a292505bdb8e721 --- solana/Dockerfile.wasm | 2 +- .../modules/token_bridge/program/src/api/create_wrapped.rs | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/solana/Dockerfile.wasm b/solana/Dockerfile.wasm index 5f467a4c9..54b388a51 100644 --- a/solana/Dockerfile.wasm +++ b/solana/Dockerfile.wasm @@ -3,7 +3,7 @@ FROM docker.io/library/rust:1.49@sha256:a50165ea96983c21832578afb1c8c028674c965b RUN apt-get update && apt-get install -y libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang RUN rustup component add rustfmt -RUN rustup default nightly +RUN rustup default nightly-2021-08-01 WORKDIR /usr/src/bridge diff --git a/solana/modules/token_bridge/program/src/api/create_wrapped.rs b/solana/modules/token_bridge/program/src/api/create_wrapped.rs index 9c19f822f..cf3c75c6d 100644 --- a/solana/modules/token_bridge/program/src/api/create_wrapped.rs +++ b/solana/modules/token_bridge/program/src/api/create_wrapped.rs @@ -140,9 +140,10 @@ pub fn create_wrapped( }, )?; - let mut name = String::from("Wormhole: ") + accs.vaa.name.as_str(); - name.truncate(32); - let mut symbol = String::from("wh") + accs.vaa.symbol.as_str(); + let mut name = accs.vaa.name.clone(); + name.truncate(32 - 11); + name += " (Wormhole)"; + let mut symbol = accs.vaa.symbol.clone(); symbol.truncate(10); let spl_token_metadata_ix = spl_token_metadata::instruction::create_metadata_accounts(