Skip to content

Commit f143a45

Browse files
committed
Merge branch 'develop' into trello.com/c/vawidi4o
# Conflicts: # Adamant.xcodeproj/project.pbxproj # Adamant/App/DI/AppAssembly.swift # Adamant/Modules/Account/AccountHeaderView.swift # Adamant/Modules/Account/AccountViewController/AccountViewController+Form.swift # Adamant/Modules/Account/AccountViewController/AccountViewController.swift # Adamant/Modules/Account/AccountViewController/AccountWallets/AccountWalletsViewModel.swift # Adamant/Modules/Delegates/DelegateDetailsViewController.swift # Adamant/Modules/Settings/PKGenerator/PKGeneratorState.swift # Adamant/Modules/Settings/PKGenerator/PKGeneratorView.swift # Adamant/Modules/Settings/PKGenerator/PKGeneratorViewModel.swift # Adamant/Modules/Settings/PrivateKeyGenerator.swift # Adamant/Modules/Wallets/Adamant/AdmWalletService.swift # Adamant/Modules/Wallets/Bitcoin/BtcWalletService.swift # Adamant/Modules/Wallets/Bitcoin/BtcWalletViewController.swift # Adamant/Modules/Wallets/Dash/DashWalletService.swift # Adamant/Modules/Wallets/Dash/DashWalletViewController.swift # Adamant/Modules/Wallets/Doge/DogeWalletService.swift # Adamant/Modules/Wallets/Doge/DogeWalletViewController.swift # Adamant/Modules/Wallets/ERC20/ERC20WalletService.swift # Adamant/Modules/Wallets/ERC20/ERC20WalletViewController.swift # Adamant/Modules/Wallets/EthBIP32Service/EthBIP32Service.swift # Adamant/Modules/Wallets/Ethereum/EthWalletService.swift # Adamant/Modules/Wallets/Ethereum/EthWalletViewController.swift # Adamant/Modules/Wallets/Klayr/KlyWalletViewController.swift # Adamant/Modules/Wallets/Klayr/WalletService/KlyWalletService+WalletCore.swift # Adamant/Modules/Wallets/Klayr/WalletService/KlyWalletService.swift # Adamant/Modules/Wallets/TransactionDetailsViewControllerBase.swift # Adamant/Modules/Wallets/TransactionsListViewControllerBase.swift # Adamant/Modules/Wallets/TransferViewControllerBase.swift # Adamant/Modules/Wallets/WalletViewControllerBase.swift # Adamant/ServiceProtocols/DialogService.swift # Adamant/ServiceProtocols/SecretWalletsManagerProtocol.swift # Adamant/Services/AdamantAccountService.swift # Adamant/Services/AdamantCoinStorageService.swift # Adamant/Services/AdmDialogService/AdamantDialogService.swift # Adamant/Services/SecretWalletsFactory.swift # Adamant/Services/SecretWalletsManager.swift
2 parents 995ad77 + bcaa967 commit f143a45

File tree

889 files changed

+29382
-25170
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

889 files changed

+29382
-25170
lines changed

.githooks/pre-commit-formatter

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
# Get only files that are staged and have changes in the index (excluding unstaged changes)
4+
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -E '\.(swift)$')
5+
6+
if [ -n "$STAGED_FILES" ]; then
7+
echo "Formatting staged files..."
8+
echo "$STAGED_FILES" | while read -r file; do
9+
scripts/AdamantCLI/adamant-cli format staged "$file"
10+
git add "$file"
11+
done
12+
else
13+
echo "No staged files to format."
14+
fi
15+
16+
exit 0

.github/workflows/tests.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# This workflow will build a Swift project
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift
3+
4+
name: run tests
5+
6+
on:
7+
workflow_call:
8+
push:
9+
branches: [ "develop" ]
10+
pull_request:
11+
branches: [ "develop" ]
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: ${{ github.ref_type != 'tag' }}
16+
17+
jobs:
18+
run_tests:
19+
runs-on: macos-15
20+
steps:
21+
- name: Set Xcode 16.2.0
22+
run: sudo xcode-select -s /Applications/Xcode_16.2.0.app/Contents/Developer
23+
- name: Print Current Xcode
24+
run: xcode-select -p
25+
- uses: actions/checkout@v3
26+
- name: Build adamant-cli
27+
run: make configure
28+
- name: Setup project dependencies
29+
run: ./scripts/AdamantCLI/adamant-cli setup
30+
- name: Pod Install
31+
run: pod install
32+
- name: Generate mocks for tests
33+
run: ./scripts/AdamantCLI/adamant-cli mocks
34+
- name: Run tests
35+
run: xcodebuild test -workspace Adamant.xcworkspace -scheme Adamant.Dev -destination 'platform=iOS Simulator,name=iPhone 16' | xcbeautify
36+
37+

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,6 @@ runkit ex.rtf
110110
to do.rtf
111111
tz.rtf
112112
profiles
113+
Generated/
114+
.swiftpm/
115+
adamant-cli

.sourcery.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
sources:
2+
- ./Adamant/
3+
- ./CommonKit/
4+
- ./BitcoinKit/
5+
templates:
6+
- ./Templates/sourcery/Mock.swifttemplate
7+
output:
8+
path: ./AdamantTests/Stubs/Generated/
9+
args:
10+
import:
11+
- CommonKit
12+
- CoreData
13+
- XCTest
14+
- Alamofire
15+
- BitcoinKit
16+
- LiskKit
17+
testable:
18+
- Adamant
19+
- SwiftyMocky
20+
- SwiftyMockyXCTest

.swiftformat

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"fileScopedDeclarationPrivacy" : {
3+
"accessLevel" : "private"
4+
},
5+
"indentConditionalCompilationBlocks" : true,
6+
"indentSwitchCaseLabels" : false,
7+
"indentation" : {
8+
"spaces" : 4
9+
},
10+
"lineBreakAroundMultilineExpressionChainComponents" : false,
11+
"lineBreakBeforeControlFlowKeywords" : false,
12+
"lineBreakBeforeEachArgument" : true,
13+
"lineBreakBeforeEachGenericRequirement" : false,
14+
"lineLength" : 160,
15+
"maximumBlankLines" : 1,
16+
"multiElementCollectionTrailingCommas" : false,
17+
"noAssignmentInExpressions" : {
18+
"allowedFunctions" : [
19+
"XCTAssertNoThrow"
20+
]
21+
},
22+
"prioritizeKeepingFunctionOutputTogether" : true,
23+
"respectsExistingLineBreaks" : true,
24+
"rules" : {
25+
"AllPublicDeclarationsHaveDocumentation" : false,
26+
"AlwaysUseLiteralForEmptyCollectionInit" : false,
27+
"AlwaysUseLowerCamelCase" : true,
28+
"AmbiguousTrailingClosureOverload" : true,
29+
"BeginDocumentationCommentWithOneLineSummary" : false,
30+
"DoNotUseSemicolons" : true,
31+
"DontRepeatTypeInStaticProperties" : true,
32+
"FileScopedDeclarationPrivacy" : true,
33+
"FullyIndirectEnum" : true,
34+
"GroupNumericLiterals" : true,
35+
"IdentifiersMustBeASCII" : true,
36+
"NeverForceUnwrap" : false,
37+
"NeverUseForceTry" : false,
38+
"NeverUseImplicitlyUnwrappedOptionals" : false,
39+
"NoAccessLevelOnExtensionDeclaration" : true,
40+
"NoAssignmentInExpressions" : true,
41+
"NoBlockComments" : true,
42+
"NoCasesWithOnlyFallthrough" : true,
43+
"NoEmptyTrailingClosureParentheses" : true,
44+
"NoLabelsInCasePatterns" : true,
45+
"NoLeadingUnderscores" : false,
46+
"NoParensAroundConditions" : true,
47+
"NoPlaygroundLiterals" : true,
48+
"NoVoidReturnOnFunctionSignature" : true,
49+
"OmitExplicitReturns" : false,
50+
"OneCasePerLine" : true,
51+
"OneVariableDeclarationPerLine" : true,
52+
"OnlyOneTrailingClosureArgument" : true,
53+
"OrderedImports" : true,
54+
"ReplaceForEachWithForLoop" : true,
55+
"ReturnVoidInsteadOfEmptyTuple" : true,
56+
"TypeNamesShouldBeCapitalized" : true,
57+
"UseEarlyExits" : false,
58+
"UseExplicitNilCheckInConditions" : true,
59+
"UseLetInEveryBoundCaseVariable" : true,
60+
"UseShorthandTypeNames" : true,
61+
"UseSingleLinePropertyGetter" : true,
62+
"UseSynthesizedInitializer" : true,
63+
"UseTripleSlashForDocumentationComments" : true,
64+
"UseWhereClausesInForLoops" : false,
65+
"ValidateDocumentationComments" : false
66+
},
67+
"spacesAroundRangeFormationOperators" : false,
68+
"tabWidth" : 8,
69+
"version" : 1
70+
}

0 commit comments

Comments
 (0)