Replacing weight with vsize in transactions api to match esplora.
This commit is contained in:
parent
47dd1f2d0b
commit
da533097d9
@ -52,7 +52,6 @@ export class Common {
|
|||||||
return {
|
return {
|
||||||
txid: tx.txid,
|
txid: tx.txid,
|
||||||
fee: tx.fee,
|
fee: tx.fee,
|
||||||
weight: tx.weight, // Deprecated
|
|
||||||
vsize: tx.weight / 4,
|
vsize: tx.weight / 4,
|
||||||
value: tx.vout.reduce((acc, vout) => acc + (vout.value ? vout.value : 0), 0),
|
value: tx.vout.reduce((acc, vout) => acc + (vout.value ? vout.value : 0), 0),
|
||||||
};
|
};
|
||||||
|
@ -31,7 +31,6 @@ export interface TransactionExtended extends IEsploraApi.Transaction {
|
|||||||
export interface TransactionStripped {
|
export interface TransactionStripped {
|
||||||
txid: string;
|
txid: string;
|
||||||
fee: number;
|
fee: number;
|
||||||
weight?: number // deprecated
|
|
||||||
vsize: number;
|
vsize: number;
|
||||||
value: number;
|
value: number;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user