Support for Pirate Coin
This commit is contained in:
parent
e530ac1104
commit
a29a4eb0f5
|
@ -4,4 +4,5 @@ allow_send = true
|
|||
|
||||
yec = { db_path = "./yec.db", lwd_url = "https://lite.ycash.xyz:9067" }
|
||||
zec = { db_path = "./zec.db", lwd_url = "https://lwdv3.zecwallet.co:443" }
|
||||
arrr = { db_path = "./arrr.db", lwd_url = "https://lightd1.pirate.black:9067" }
|
||||
# zec = { db_path = "./zec.db", lwd_url = "https://zuul.free2z.cash:9067" }
|
||||
|
|
|
@ -53,7 +53,7 @@ fn new_account_with_key(coin: u8, name: &str, key: &str, index: u32) -> anyhow::
|
|||
let db = c.db()?;
|
||||
let (account, exists) =
|
||||
db.store_account(name, seed.as_deref(), index, sk.as_deref(), &ivk, &pa)?;
|
||||
if !exists {
|
||||
if !exists && c.chain.has_transparent() {
|
||||
db.create_taddr(account)?;
|
||||
}
|
||||
Ok(account)
|
||||
|
|
|
@ -110,6 +110,7 @@ pub unsafe extern "C" fn init_wallet(db_path: *mut c_char) {
|
|||
from_c_str!(db_path);
|
||||
let _ = init_coin(0, &format!("{}/zec.db", &db_path));
|
||||
let _ = init_coin(1, &format!("{}/yec.db", &db_path));
|
||||
let _ = init_coin(2, &format!("{}/arrr.db", &db_path));
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
|
|
|
@ -10,9 +10,10 @@ use zcash_params::{OUTPUT_PARAMS, SPEND_PARAMS};
|
|||
use zcash_proofs::prover::LocalTxProver;
|
||||
|
||||
lazy_static! {
|
||||
pub static ref COIN_CONFIG: [Mutex<CoinConfig>; 2] = [
|
||||
pub static ref COIN_CONFIG: [Mutex<CoinConfig>; 3] = [
|
||||
Mutex::new(CoinConfig::new(0, CoinType::Zcash)),
|
||||
Mutex::new(CoinConfig::new(1, CoinType::Ycash)),
|
||||
Mutex::new(CoinConfig::new(2, CoinType::PirateChain)),
|
||||
];
|
||||
pub static ref PROVER: AtomicLazyCell<LocalTxProver> = AtomicLazyCell::new();
|
||||
pub static ref RAPTORQ: Mutex<FountainCodes> = Mutex::new(FountainCodes::new());
|
||||
|
|
|
@ -70,6 +70,8 @@ async fn main() -> anyhow::Result<()> {
|
|||
init(0, zec)?;
|
||||
let yec: HashMap<String, String> = figment.extract_inner("yec")?;
|
||||
init(1, yec)?;
|
||||
let arrr: HashMap<String, String> = figment.extract_inner("arrr")?;
|
||||
init(2, arrr)?;
|
||||
|
||||
warp_api_ffi::set_active_account(0, 1);
|
||||
warp_api_ffi::set_active(0);
|
||||
|
|
Loading…
Reference in New Issue