Bump version #
This commit is contained in:
parent
bba488a501
commit
152fe56a1e
|
@ -1,10 +1,8 @@
|
|||
[package]
|
||||
name = "sync"
|
||||
version = "0.1.0"
|
||||
name = "zcash-warpsync"
|
||||
version = "1.2.15"
|
||||
authors = ["Hanh <hanh425@gmail.com>"]
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
edition = "2021"
|
||||
|
||||
[[bench]]
|
||||
name = "scan_all"
|
||||
|
|
|
@ -31,10 +31,12 @@ pub fn make_payment_uri(address: &str, amount: u64, memo: &str) -> anyhow::Resul
|
|||
|
||||
pub fn parse_payment_uri(uri: &str) -> anyhow::Result<PaymentURI> {
|
||||
let c = CoinConfig::get_active();
|
||||
if uri[..5].ne(c.chain.ticker()) {
|
||||
let scheme = c.chain.ticker();
|
||||
let scheme_len = scheme.len();
|
||||
if uri[..scheme_len].ne(scheme) {
|
||||
anyhow::bail!("Invalid Payment URI: Invalid scheme");
|
||||
}
|
||||
let uri = format!("zcash{}", &uri[5..]); // hack to replace the URI scheme
|
||||
let uri = format!("zcash{}", &uri[scheme_len..]); // hack to replace the URI scheme
|
||||
let treq = TransactionRequest::from_uri(c.chain.network(), &uri)
|
||||
.map_err(|e| anyhow::anyhow!("Invalid Payment URI: {:?}", e))?;
|
||||
if treq.payments.len() != 1 {
|
||||
|
|
Loading…
Reference in New Issue