mirror of
https://github.com/mempool/mempool.git
synced 2025-03-17 21:32:02 +01:00
Merge pull request #5716 from mempool/natsoni/fix-address-amount
Fix transaction amount change for P2PK addresses
This commit is contained in:
commit
ca0a8aee49
@ -202,12 +202,12 @@ export class TransactionsListComponent implements OnInit, OnChanges {
|
||||
for (const address of this.addresses) {
|
||||
switch (address.length) {
|
||||
case 130: {
|
||||
if (v.scriptpubkey === '21' + address + 'ac') {
|
||||
if (v.scriptpubkey === '41' + address + 'ac') {
|
||||
return v.value;
|
||||
}
|
||||
} break;
|
||||
case 66: {
|
||||
if (v.scriptpubkey === '41' + address + 'ac') {
|
||||
if (v.scriptpubkey === '21' + address + 'ac') {
|
||||
return v.value;
|
||||
}
|
||||
} break;
|
||||
@ -224,12 +224,12 @@ export class TransactionsListComponent implements OnInit, OnChanges {
|
||||
for (const address of this.addresses) {
|
||||
switch (address.length) {
|
||||
case 130: {
|
||||
if (v.prevout?.scriptpubkey === '21' + address + 'ac') {
|
||||
if (v.prevout?.scriptpubkey === '41' + address + 'ac') {
|
||||
return v.prevout?.value;
|
||||
}
|
||||
} break;
|
||||
case 66: {
|
||||
if (v.prevout?.scriptpubkey === '41' + address + 'ac') {
|
||||
if (v.prevout?.scriptpubkey === '21' + address + 'ac') {
|
||||
return v.prevout?.value;
|
||||
}
|
||||
} break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user