Skip to content

Commit

Permalink
removes unused argument from RawTransaction.postedSize
Browse files Browse the repository at this point in the history
the publicAddress passed to postedSize is not used
  • Loading branch information
hughy committed Dec 3, 2024
1 parent 17a0d65 commit 71f6b43
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions ironfish/src/primitives/rawTransaction.test.slow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ describe('RawTransaction', () => {
)
).serialize()

expect(raw.postedSize(account.publicAddress)).toEqual(serialized.byteLength)
expect(raw.postedSize()).toEqual(serialized.byteLength)
})
})
})
Expand Down Expand Up @@ -254,7 +254,7 @@ describe('RawTransaction', () => {
)
).serialize()

expect(raw.postedSize(account.publicAddress)).toEqual(serialized.byteLength)
expect(raw.postedSize()).toEqual(serialized.byteLength)
})
})
})
Expand Down
2 changes: 1 addition & 1 deletion ironfish/src/primitives/rawTransaction.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ describe('RawTransaction', () => {

// should have same size for posted transaction and estimated size from raw transaction
const serializedPost = posted.serialize()
expect(raw.postedSize(account.publicAddress)).toEqual(serializedPost.byteLength)
expect(raw.postedSize()).toEqual(serializedPost.byteLength)
})

it('should throw an error if the max mint value is exceeded', async () => {
Expand Down
2 changes: 1 addition & 1 deletion ironfish/src/primitives/rawTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class RawTransaction {
this.version = version
}

postedSize(_publicAddress: string): number {
postedSize(): number {
let size = 0
size += 1 // version
size += 8 // spends length
Expand Down
4 changes: 2 additions & 2 deletions ironfish/src/wallet/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ export class Wallet {
}

if (options.feeRate) {
raw.fee = getFee(options.feeRate, raw.postedSize(options.account.publicAddress))
raw.fee = getFee(options.feeRate, raw.postedSize())
}

await this.fund(raw, {
Expand All @@ -924,7 +924,7 @@ export class Wallet {
})

if (options.feeRate) {
raw.fee = getFee(options.feeRate, raw.postedSize(options.account.publicAddress))
raw.fee = getFee(options.feeRate, raw.postedSize())
raw.spends = []

await this.fund(raw, {
Expand Down

0 comments on commit 71f6b43

Please sign in to comment.