Skip to content

Commit

Permalink
Merge pull request #6 from trm-dev/blockchain_id
Browse files Browse the repository at this point in the history
Settings was edited corresponding with new requirements
  • Loading branch information
trmdevadmin authored Aug 9, 2021
2 parents 21c68bb + f9aa579 commit 4ca9f33
Show file tree
Hide file tree
Showing 923 changed files with 27 additions and 298,413 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@
[submodule "build-system/bazel-rules/apple_support"]
path = build-system/bazel-rules/apple_support
url = https://github.com/bazelbuild/apple_support.git
[submodule "submodules/ton/tonlib-src"]
path = submodules/ton/tonlib-src
url = https://github.com/trm-dev/ton.git
4 changes: 2 additions & 2 deletions Wallet/Sources/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -997,8 +997,8 @@ private extension MergedLocalWalletConfiguration {
resolved: nil),*/
testNet: MergedLocalBlockchainConfiguration(
configuration: LocalBlockchainConfiguration(
source: .url("https://newton-blockchain.github.io/global.config.json"),
customId: "testnet2"
source: .url("https://ton.org/global-config-wallet.json"),
customId: "mainnet"
),
resolved: nil
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ class ItemListSingleLineInputItemNode: ListViewItemNode, UITextFieldDelegate, It
}
}

if string.count > 1, let item = self.item, let processPaste = item.processPaste {
if string.count >= 1, let item = self.item, let processPaste = item.processPaste {
let result = processPaste(string)
if result != string {
var text = textField.text ?? ""
Expand Down
11 changes: 6 additions & 5 deletions submodules/WalletUI/Sources/WalletConfgurationScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ private enum WalletConfigurationScreenEntry: ItemListNodeEntry, Equatable {
case let .blockchainName(theme, strings, title, value):
return ItemListSingleLineInputItem(theme: theme, strings: strings, title: NSAttributedString(string: ""), text: value, placeholder: title, type: .regular(capitalization: false, autocorrection: false), sectionId: self.section, textUpdated: { value in
arguments.updateBlockchainName(value)
}, action: {})
}, processPaste: { $0.lowercased() }, action: {})
case let .blockchainNameInfo(theme, text):
return ItemListTextItem(theme: theme, text: .plain(text), sectionId: self.section)
}
Expand Down Expand Up @@ -224,9 +224,9 @@ private struct WalletConfigurationScreenState: Equatable {
}
}

if self.configuration.testNet.customId == "mainnet" {
return nil
}
// if self.configuration.testNet.customId == "mainnet" {
// return nil
// }

return LocalWalletConfiguration(
//mainNet: LocalBlockchainConfiguration(source: mainSource, customId: nil),
Expand All @@ -244,7 +244,8 @@ private struct WalletConfigurationScreenState: Equatable {
blockchainConfiguration = self.configuration.testNet
}

if self.configuration.testNet.customId == "mainnet" {
if let id = self.configuration.testNet.customId,
id.isEmpty {
return true
}

Expand Down
11 changes: 11 additions & 0 deletions submodules/ton/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
0. make sure you have installed openssl and cmake(optional ninja)
1. git submodule update --init --recursive
2. cd tonlib-src
3. mkdir build
4. cd build
5. cmake --DOPENSSL_ROOT_DIR=*openssl_path* .. (optional -GNinja)
6. cmake --build . --target prepare_cross_compiling (optional ninja prepare_cross_compiling)
7. cd ..
8. rm -rf build
9. cd ..
10. profit=)
4 changes: 3 additions & 1 deletion submodules/ton/build-ton-bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ mkdir -p "$OUT_DIR"
mkdir -p "$OUT_DIR/build"
cd "$OUT_DIR/build"

git_executable_path="/usr/bin/git"
openssl_path="$openssl_base_path"
echo "OpenSSL path = ${openssl_path}"
openssl_crypto_library="${openssl_path}/lib/libcrypto.a"
Expand All @@ -35,6 +36,7 @@ options="$options -DOPENSSL_CRYPTO_LIBRARY=${openssl_crypto_library}"
options="$options -DOPENSSL_INCLUDE_DIR=${openssl_path}/include"
options="$options -DOPENSSL_LIBRARIES=${openssl_crypto_library}"
options="$options -DCMAKE_BUILD_TYPE=Release"
options="$options -DGIT_EXECUTABLE=${git_executable_path}"

build="build-${arch}"
install="install-${arch}"
Expand All @@ -54,7 +56,7 @@ rm -rf $build
mkdir -p $build
mkdir -p $install
cd $build
cmake $td_path $options -DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN" -DIOS_PLATFORM=${ios_platform} -DTON_ARCH= -DCMAKE_INSTALL_PREFIX=../${install}
cmake $td_path $options -DTON_ONLY_TONLIB=ON -DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN" -DIOS_PLATFORM=${ios_platform} -DTON_ARCH= -DCMAKE_INSTALL_PREFIX=../${install}
CORE_COUNT=`sysctl -n hw.logicalcpu`
make -j$CORE_COUNT install || exit
cd ..
Expand Down
1 change: 1 addition & 0 deletions submodules/ton/tonlib-src
Submodule tonlib-src added at 93d3c9
74 changes: 0 additions & 74 deletions submodules/ton/tonlib-src/CMake/AddCXXCompilerFlag.cmake

This file was deleted.

21 changes: 0 additions & 21 deletions submodules/ton/tonlib-src/CMake/FindJeMalloc.cmake

This file was deleted.

38 changes: 0 additions & 38 deletions submodules/ton/tonlib-src/CMake/FindMHD.cmake

This file was deleted.

25 changes: 0 additions & 25 deletions submodules/ton/tonlib-src/CMake/FindReadline.cmake

This file was deleted.

Loading

0 comments on commit 4ca9f33

Please sign in to comment.