Skip to content

Commit

Permalink
don't import to_ed25519
Browse files Browse the repository at this point in the history
  • Loading branch information
sisuresh committed Sep 20, 2022
1 parent e053cfe commit 236d511
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions contracts/crowdfund/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ use crate::testutils::{register_test_contract as register_crowdfund, Crowdfund};
use ed25519_dalek::Keypair;
use rand::{thread_rng, RngCore};
use soroban_auth::Identifier;
use soroban_sdk::{testutils::LedgerInfo, BigInt, BytesN, Env};
use soroban_token_contract::testutils::{
register_test_contract as register_token, to_ed25519, Token,
};
use soroban_sdk::{testutils::LedgerInfo, BigInt, BytesN, Env, IntoVal};
use soroban_token_contract::testutils::{register_test_contract as register_token, Token};

fn generate_contract_id() -> [u8; 32] {
let mut id: [u8; 32] = Default::default();
Expand All @@ -19,6 +17,10 @@ fn generate_keypair() -> Keypair {
Keypair::generate(&mut thread_rng())
}

fn to_ed25519(e: &Env, kp: &Keypair) -> Identifier {
Identifier::Ed25519(kp.public.to_bytes().into_val(e))
}

fn create_token_contract(e: &Env, admin: &Keypair) -> (BytesN<32>, Token) {
let id = generate_contract_id();
register_token(&e, &id);
Expand Down

0 comments on commit 236d511

Please sign in to comment.