feature: Signature derives Copy trait (#288)

* feature: Signature derives Copy trait

* drive-by: set Celo chain ID in tests
This commit is contained in:
James Prestwich 2021-05-09 02:47:21 -07:00 committed by GitHub
parent 33a39cff86
commit b014ac9f27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -494,7 +494,8 @@ mod celo_tests {
// Funded with https://celo.org/developers/faucet // Funded with https://celo.org/developers/faucet
let wallet = "d652abb81e8c686edba621a895531b1f291289b63b5ef09a94f686a5ecdd5db1" let wallet = "d652abb81e8c686edba621a895531b1f291289b63b5ef09a94f686a5ecdd5db1"
.parse::<LocalWallet>() .parse::<LocalWallet>()
.unwrap(); .unwrap()
.set_chain_id(44787u64);
let client = SignerMiddleware::new(provider, wallet); let client = SignerMiddleware::new(provider, wallet);
let client = Arc::new(client); let client = Arc::new(client);

View File

@ -51,7 +51,7 @@ pub enum RecoveryMessage {
Hash(H256), Hash(H256),
} }
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)] #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, Copy)]
/// An ECDSA signature /// An ECDSA signature
pub struct Signature { pub struct Signature {
/// R value /// R value

View File

@ -53,7 +53,8 @@ async fn test_send_transaction() {
// Please do not drain this account :) // Please do not drain this account :)
let wallet = "d652abb81e8c686edba621a895531b1f291289b63b5ef09a94f686a5ecdd5db1" let wallet = "d652abb81e8c686edba621a895531b1f291289b63b5ef09a94f686a5ecdd5db1"
.parse::<LocalWallet>() .parse::<LocalWallet>()
.unwrap(); .unwrap()
.set_chain_id(44787u64);
let client = SignerMiddleware::new(provider, wallet); let client = SignerMiddleware::new(provider, wallet);
let balance_before = client.get_balance(client.address(), None).await.unwrap(); let balance_before = client.get_balance(client.address(), None).await.unwrap();