This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 46
feature: set feelimit percentage in settings #315
Open
chitowncrispy
wants to merge
11
commits into
LN-Zap:master
Choose a base branch
from
chitowncrispy:issue278
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
3295436
Adding a user option for selecting their fee limit for payments
chitowncrispy 82a0b65
Removing unnecessary weak self declaration
chitowncrispy 74dddb7
Moving PaymentFeeLimitPercentage to Library
chitowncrispy 0cbcbea
Merge branch 'master' of github.com:LN-Zap/zap-iOS into issue278
chitowncrispy 1008c3c
Addressing review comments and utilizing the correct error message de…
chitowncrispy 668176e
Merge branch 'master' of github.com:LN-Zap/zap-iOS into issue278
chitowncrispy 12f22cc
Merge branch 'master' of github.com:LN-Zap/zap-iOS into issue278
chitowncrispy 022f7d8
Adding unit tests for the SendViewModel
chitowncrispy 6a69339
PR comments
chitowncrispy ad91e0d
Merge branch 'master' of github.com:LN-Zap/zap-iOS into issue278
chitowncrispy eac918e
Fixing tests
chitowncrispy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
19 changes: 19 additions & 0 deletions
19
Library/Extensions/Localizable/PaymentFeeLimitPercentage+Localizable.swift
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// | ||
// Library | ||
// | ||
// Created by Christopher Pinski on 10/26/19. | ||
// Copyright © 2019 Zap. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
extension PaymentFeeLimitPercentage: Localizable { | ||
public var localized: String { | ||
switch self { | ||
case .none: | ||
return L10n.PaymentFeeLimitPercentage.none | ||
default: | ||
return self.rawValue.formattedAsPercentage | ||
} | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like my
UIAlertController
extension any more 😅Imo it would make sense to remove it and put the Alerts in the ViewControllers where they are actually used.
(as long as both Alerts are only used in one place).
Otherwise the code just gets separated without much benefit. just makes it harder to reason about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My other PR also has an alert added to this controller. I don't mind where they live but I would rather open an issue to refactor the alerts out of this extension and address it after the PRs are merged rather than refactor both PRs.