forked from Electric-Coin-Company/zashi-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Electric-Coin-Company#1092] Adopt proposal API
- TCA sdkSYnchronizer dependency extended with 3 new Proposal APIs - proposeTransfer tested, works as expected [Electric-Coin-Company#1092] Adopt proposal API - send transaction via new proposal API implemented [Electric-Coin-Company#1092] Adopt proposal API - code cleaned up and finished [Electric-Coin-Company#1092] Adopt proposal API - unit tests fixed [Electric-Coin-Company#1092] Adopt proposal API - Typical Fee < 0.001 localized and updated in the UI [Electric-Coin-Company#1092] Adopt proposal API - awaiting all transaction results with use of new proposal.transactionCount() method [Electric-Coin-Company#1092] Adopt proposal API - Implemented new PartialProposalError reducer and view - Contact support mail with transaction IDs logic implemented - Fallback to share logic implemented - PPE integrated into SendFlow - PPE integrated into Shielding [Electric-Coin-Company#1092] Adopt proposal API - Changelog updated [Electric-Coin-Company#1092] Adopt proposal API - SDK's fee constant removed [Electric-Coin-Company#1092] Adopt proposal API (Electric-Coin-Company#1117) - debug code reverted [Electric-Coin-Company#1092] Adopt proposal API (Electric-Coin-Company#1117) - copy change [Electric-Coin-Company#1092] Adopt proposal API (Electric-Coin-Company#1117) - code cleanup
- Loading branch information
1 parent
c848e5f
commit 4253ca5
Showing
28 changed files
with
673 additions
and
140 deletions.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ public enum SupportDataGenerator { | |
public enum Constants { | ||
public static let email = "[email protected]" | ||
public static let subject = "Zashi" | ||
public static let subjectPPE = "Zashi - transaction error" | ||
} | ||
|
||
public static func generate() -> SupportData { | ||
|
@@ -43,6 +44,31 @@ public enum SupportDataGenerator { | |
|
||
return SupportData(toAddress: Constants.email, subject: Constants.subject, message: message) | ||
} | ||
|
||
public static func generatePartialProposalError(txIds: [String]) -> SupportData { | ||
let data = SupportDataGenerator.generate() | ||
|
||
let idsString = txIds.map { id in | ||
"- ID: \(id)" | ||
} | ||
.joined(separator: "\n") | ||
|
||
let message = | ||
""" | ||
Hi Zashi Team, | ||
While sending a transaction, I encountered an error state. | ||
This is the list of the transaction IDs: | ||
\(idsString.description) | ||
Thanks for your support. | ||
\(data.message) | ||
""" | ||
|
||
return SupportData(toAddress: Constants.email, subject: Constants.subjectPPE, message: message) | ||
} | ||
} | ||
|
||
private protocol SupportDataGeneratorItem { | ||
|
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.