mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-11 05:04:35 +00:00
namecoin electrumx fixes
This commit is contained in:
parent
47c904eac4
commit
e1e4100a6d
1 changed files with 7 additions and 7 deletions
|
@ -2444,8 +2444,8 @@ class NamecoinWallet extends CoinServiceAPI {
|
|||
for (final out in tx["vout"] as List) {
|
||||
if (prevOut == out["n"]) {
|
||||
String? address = out["scriptPubKey"]["address"] as String?;
|
||||
if (address == null && out["scriptPubKey"]["addresses"] != null) {
|
||||
address = out["scriptPubKey"]["addresses"][0] as String?;
|
||||
if (address == null && out["scriptPubKey"]["address"] != null) {
|
||||
address = out["scriptPubKey"]["address"] as String?;
|
||||
}
|
||||
|
||||
if (address != null) {
|
||||
|
@ -2459,8 +2459,8 @@ class NamecoinWallet extends CoinServiceAPI {
|
|||
|
||||
for (final output in txObject["vout"] as List) {
|
||||
String? address = output["scriptPubKey"]["address"] as String?;
|
||||
if (address == null && output["scriptPubKey"]["addresses"] != null) {
|
||||
address = output["scriptPubKey"]["addresses"][0] as String?;
|
||||
if (address == null && output["scriptPubKey"]["address"] != null) {
|
||||
address = output["scriptPubKey"]["address"] as String?;
|
||||
}
|
||||
if (address != null) {
|
||||
recipientsArray.add(address);
|
||||
|
@ -2528,8 +2528,8 @@ class NamecoinWallet extends CoinServiceAPI {
|
|||
// add up received tx value
|
||||
for (final output in txObject["vout"] as List) {
|
||||
String? address = output["scriptPubKey"]["address"] as String?;
|
||||
if (address == null && output["scriptPubKey"]["addresses"] != null) {
|
||||
address = output["scriptPubKey"]["addresses"][0] as String?;
|
||||
if (address == null && output["scriptPubKey"]["address"] != null) {
|
||||
address = output["scriptPubKey"]["address"] as String?;
|
||||
}
|
||||
if (address != null) {
|
||||
final value = (Decimal.parse(output["value"].toString()) *
|
||||
|
@ -3049,7 +3049,7 @@ class NamecoinWallet extends CoinServiceAPI {
|
|||
for (final output in tx["vout"] as List) {
|
||||
final n = output["n"];
|
||||
if (n != null && n == utxosToUse[i].vout) {
|
||||
final address = output["scriptPubKey"]["addresses"][0] as String;
|
||||
final address = output["scriptPubKey"]["address"] as String;
|
||||
if (!addressTxid.containsKey(address)) {
|
||||
addressTxid[address] = <String>[];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue