Techdebt/update fpf core#109
Merged
Merged
Conversation
fixed Obj-C bug in Core
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📱 Description
This PR updates the FPF (False Positive Filter) core module and adds comprehensive test coverage for all global constants. It introduces a dust threshold validation in the transaction creation flow to prevent sending amounts below the standard P2PKH minimum (546 litoshis), refactors the
Sender.createTransactionWithOpsOutputsmethod signature for clarity, and establishes a complete unit test suite validating layout constants, monetary values, identifiers, URLs, and network parameters.Platform
🎯 Type of Change
📋 Changes
New Components Added
Constants+Events.swift): Added a module-level constant defining the standard P2PKH dust limit at 546 litoshis to prevent network rejection of sub-dust outputs.Modifications
ConstantsTests.swift: Expanded from empty test class to comprehensive 305-line test suite with 50+ test methods covering:
E.isTestnet)@MainActorannotation and reordered imports per Swift conventionsSender.swift:
createTransactionWithOpsOutputs(amount:to:)tocreateTransactionWithOpsOutputs(amount:toAddress:)for parameter clarityamount > 0with assertion failurelitoshiDustThresholdconstant (546 litoshis)BentoSendConfirmView.swift: Updated method call to use new
toAddressparameter name increateTransactionWithOpsOutputsinvocationModules/core: Updated SPM module dependency (details not visible in truncated diff)
brainwallet.xcodeproj/project.pbxproj: Updated Xcode project configuration for core module integration
Removals
ConstantsTestsclass definition📊 Statistics
🧪 Tests Status
🎯 Reviewers
@kcw-grunt @josikie