Skip to content

Commit 71cf6cf

Browse files
committed
update naming
1 parent d8ecb2f commit 71cf6cf

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/indexer/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,6 @@ export type RuneBlockIndex = {
153153
etchings: RuneEtching[];
154154
mintCounts: RuneMintCount[];
155155
utxoBalances: RuneUtxoBalance[];
156-
spentOutputs: SpentRuneUtxoBalance[];
156+
spentBalances: SpentRuneUtxoBalance[];
157157
burnedBalances: RuneBalance[];
158158
};

src/indexer/updater.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export class RuneUpdater implements RuneBlockIndex {
3939
block: BlockInfo;
4040
etchings: RuneEtching[] = [];
4141
utxoBalances: RuneUtxoBalance[] = [];
42-
spentOutputs: SpentRuneUtxoBalance[] = [];
42+
spentBalances: SpentRuneUtxoBalance[] = [];
4343

4444
private _minimum: Rune;
4545
private _mintCountsByRuneLocation: Map<string, RuneMintCount> = new Map();
@@ -452,7 +452,7 @@ export class RuneUpdater implements RuneBlockIndex {
452452
const balance = unallocated.get(runeLocation) ?? { runeId, amount: 0n };
453453
unallocated.set(runeLocation, balance);
454454
balance.amount = u128.checkedAddThrow(u128(balance.amount), u128(additionalBalance.amount));
455-
this.spentOutputs.push({
455+
this.spentBalances.push({
456456
txid: input.txid,
457457
vout: input.vout,
458458
address: additionalBalance.address,

test/updater.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ describe('edict', () => {
882882
await runeUpdater.indexRunes(tx2, 89);
883883
expect(runeUpdater.etchings.length).toBe(0);
884884
expect(runeUpdater.utxoBalances.length).toBe(2);
885-
expect(runeUpdater.spentOutputs.length).toBe(2);
885+
expect(runeUpdater.spentBalances.length).toBe(2);
886886
expect(runeUpdater.utxoBalances[0]).toMatchObject({
887887
txid: 'txid',
888888
vout: 1,
@@ -903,7 +903,7 @@ describe('edict', () => {
903903
},
904904
amount: 400n,
905905
});
906-
expect(runeUpdater.spentOutputs[0]).toMatchObject({
906+
expect(runeUpdater.spentBalances[0]).toMatchObject({
907907
txid: 'parenttxid',
908908
vout: 0,
909909
address: '3P4WqXDbSLRhzo2H6MT6YFbvBKBDPLbVtQ',
@@ -916,7 +916,7 @@ describe('edict', () => {
916916
amount: 400n,
917917
mempoolTxid: 'txid',
918918
});
919-
expect(runeUpdater.spentOutputs[1]).toMatchObject({
919+
expect(runeUpdater.spentBalances[1]).toMatchObject({
920920
txid: 'txid',
921921
vout: 1,
922922
address: '3P4WqXDbSLRhzo2H6MT6YFbvBKBDPLbVtQ',

0 commit comments

Comments
 (0)