mirror of
https://github.com/transatoshi-mw/grin-explorer.git
synced 2025-10-21 13:33:41 +00:00
Kernel api for Coinbase has no fee field, so remove it
This commit is contained in:
@@ -411,8 +411,8 @@ pub async fn get_kernel(excess: &str, kernel: &mut Kernel)
|
||||
let resp = call("get_kernel", params, "1", "foreign").await?;
|
||||
|
||||
if resp["result"]["Ok"].is_null() == false {
|
||||
kernel.height = resp["result"]["Ok"]["height"].to_string();
|
||||
kernel.excess = resp["result"]["Ok"]["tx_kernel"]["excess"].as_str().unwrap().to_string();
|
||||
kernel.height = resp["result"]["Ok"]["height"].to_string();
|
||||
kernel.excess = resp["result"]["Ok"]["tx_kernel"]["excess"].as_str().unwrap().to_string();
|
||||
if resp["result"]["Ok"]["tx_kernel"]["features"]["Plain"].is_null() == false {
|
||||
kernel.ker_type = "Plain".to_string();
|
||||
kernel.fee = format!("ツ {}",
|
||||
@@ -420,7 +420,6 @@ pub async fn get_kernel(excess: &str, kernel: &mut Kernel)
|
||||
.to_string().parse::<f64>().unwrap() / 1000000000.0);
|
||||
} else {
|
||||
kernel.ker_type = resp["result"]["Ok"]["tx_kernel"]["features"].as_str().unwrap().to_string();
|
||||
kernel.fee = "ツ 0".to_string();
|
||||
}
|
||||
|
||||
kernel.raw_data = serde_json::to_string_pretty(&resp).unwrap()
|
||||
|
@@ -26,11 +26,13 @@
|
||||
<div class="value-text">Type </div>
|
||||
<div class="value-text text-end">{{ kernel.ker_type }}</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="value-text">Fee </div>
|
||||
<div class="value-text text-end">{{ kernel.fee }}</div>
|
||||
</div>
|
||||
{% if kernel.ker_type == "Plain" %}
|
||||
<br>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="value-text">Fee </div>
|
||||
<div class="value-text text-end">{{ kernel.fee }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user