Skip to content

fix: use entered regtest deposit address - #669

Open
pwltr wants to merge 1 commit into
masterfrom
fix/regtest-deposit-address
Open

fix: use entered regtest deposit address#669
pwltr wants to merge 1 commit into
masterfrom
fix/regtest-deposit-address

Conversation

@pwltr

@pwltr pwltr commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes the Blocktank regtest deposit form so deposits are sent to the address shown in the address field instead of silently generating a new address for the current primary address type.

Details

  • Uses the visible/editable depositAddress value when calling regtestDepositFunds
  • Trims whitespace/newlines before submitting
  • Disables the Deposit button when the address field is empty
  • Keeps the normalized submitted address in the field after a successful deposit

Verification

  • Ran swiftformat on Bitkit/Views/Settings/BlocktankRegtestView.swift
  • Verified arm64 simulator build succeeds:
    xcodebuild -workspace Bitkit.xcodeproj/project.xcworkspace -scheme Bitkit -configuration Debug -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' ARCHS=arm64 ONLY_ACTIVE_ARCH=YES build

@greptile-apps

greptile-apps Bot commented Aug 14, 2026

Copy link
Copy Markdown

Greptile Summary

The PR changes the Blocktank regtest deposit form to normalize and submit its editable address rather than generating another address during submission.

  • Trims the submitted address and preserves the normalized value after success.
  • Disables deposits for an empty raw address.
  • Removes address generation from the Deposit action.

Confidence Score: 4/5

The asynchronous address overwrite should be fixed before merging because it can direct a deposit somewhere other than the address the user entered.

The changed submission path trusts mutable address state while existing on-appear and refresh tasks can still replace that state after user input; the raw-versus-trimmed emptiness mismatch also permits an avoidable invalid submission.

Files Needing Attention: Bitkit/Views/Settings/BlocktankRegtestView.swift

Important Files Changed

Filename Overview
Bitkit/Views/Settings/BlocktankRegtestView.swift The form now submits its address field correctly in the ordinary case, but pending address-generation work can replace user input before submission, and whitespace-only input leaves the button incorrectly enabled.

Reviews (1): Last reviewed commit: "fix: use entered regtest deposit address" | Re-trigger Greptile

Comment thread Bitkit/Views/Settings/BlocktankRegtestView.swift Outdated
Comment thread Bitkit/Views/Settings/BlocktankRegtestView.swift Outdated
@pwltr
pwltr force-pushed the fix/regtest-deposit-address branch from aa68f6d to 514c4be Compare August 14, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant