Compare commits

..

No commits in common. "master" and "v0.2.2" have entirely different histories.

13 changed files with 639 additions and 650 deletions

View file

@ -109,11 +109,11 @@ jobs:
- name: Install cargo-zigbuild
run: cargo install cargo-zigbuild
- name: Download SDK
run: wget https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.0.sdk.tar.xz
run: wget https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX10.15.sdk.tar.xz
- name: Setup SDK env
run: tar xf ${{ github.workspace }}/MacOSX11.0.sdk.tar.xz && echo "SDKROOT=${{ github.workspace }}/MacOSX11.0.sdk" >> $GITHUB_ENV
run: tar xf ${{ github.workspace }}/MacOSX10.15.sdk.tar.xz && echo "SDKROOT=${{ github.workspace }}/MacOSX10.15.sdk" >> $GITHUB_ENV
- name: Setup platform env
run: echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> $GITHUB_ENV
run: echo "MACOSX_DEPLOYMENT_TARGET=10.15" >> $GITHUB_ENV
- name: Release x86
run: |
rustup target add x86_64-apple-darwin
@ -129,6 +129,12 @@ jobs:
working-directory: target/x86_64-apple-darwin/release
shell: bash
run: sha256sum grim-${{ github.ref_name }}-macos-x86_64.zip > grim-${{ github.ref_name }}-macos-x86_64-sha256sum.txt
- name: Download SDK
run: wget https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.0.sdk.tar.xz
- name: Setup SDK env
run: tar xf ${{ github.workspace }}/MacOSX11.0.sdk.tar.xz && echo "SDKROOT=${{ github.workspace }}/MacOSX11.0.sdk" >> $GITHUB_ENV
- name: Setup platform env
run: echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> $GITHUB_ENV
- name: Release ARM
run: |
rustup target add aarch64-apple-darwin

1159
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
[package]
name = "grim"
version = "0.2.3"
version = "0.2.2"
authors = ["Ardocrat <ardocrat@proton.me>"]
description = "Cross-platform GUI for Grin with focus on usability and availability to be used by anyone, anywhere."
license = "Apache-2.0"
@ -78,23 +78,23 @@ gif = "0.13.1"
rkv = { version = "0.19.0", features = ["lmdb"] }
## tor
arti-client = { version = "0.26.0", features = ["pt-client", "static", "onion-service-service", "onion-service-client"] }
tor-rtcompat = { version = "0.26.0", features = ["static"] }
tor-config = "0.26.0"
arti-client = { version = "0.23.0", features = ["pt-client", "static", "onion-service-service", "onion-service-client"] }
tor-rtcompat = { version = "0.23.0", features = ["static"] }
tor-config = "0.23.0"
fs-mistrust = "0.8.0"
tor-hsservice = "0.26.0"
tor-hsrproxy = "0.26.0"
tor-keymgr = "0.26.0"
tor-llcrypto = "0.26.0"
tor-hscrypto = "0.26.0"
tor-error = "0.26.0"
tor-hsservice = "0.23.0"
tor-hsrproxy = "0.23.0"
tor-keymgr = "0.23.0"
tor-llcrypto = "0.23.0"
tor-hscrypto = "0.23.0"
tor-error = "0.23.0"
sha2 = "0.10.8"
ed25519-dalek = "2.1.1"
curve25519-dalek = "4.1.3"
hyper = { version = "0.14.30", features = ["full"] }
hyper-tls = "0.5.0"
tls-api = "0.12.0"
tls-api-native-tls = "0.12.1"
tls-api = "0.9.0"
tls-api-native-tls = "0.9.0"
## stratum server
tokio-old = {version = "0.2", features = ["full"], package = "tokio" }
@ -108,6 +108,7 @@ nokhwa = { version = "0.10.5", default-features = false, features = ["input-msmf
[target.'cfg(target_os = "macos")'.dependencies]
eye = { git = "https://github.com/raymanfx/eye-rs", rev = "5b7e3f7a1e79966091692896c568aab042e449ef", default-features = false }
tls-api-openssl = "0.9.0"
[target.'cfg(not(target_os = "android"))'.dependencies]
env_logger = "0.11.3"

View file

@ -1,11 +1,11 @@
# Grim <img height="20" src="https://gri.mw/code/GUI/grim/raw/branch/master/img/grin-logo.png"/> <img height="20" src="https://gri.mw/code/GUI/grim/raw/branch/master/img/logo.png"/>
# <img height="22" src="https://github.com/ardocrat/grim/blob/master/android/app/src/main/ic_launcher-playstore.png?raw=true"> Grim <img height="20" src="https://github.com/mimblewimble/site/blob/master/assets/images/grin-logo.png?raw=true"> <img height="20" src="https://github.com/ardocrat/grim/blob/master/img/logo.png?raw=true">
Cross-platform GUI for [GRiN ツ](https://grin.mw) in [Rust](https://www.rust-lang.org/)
for maximum compatibility with original [Mimblewimble](https://github.com/mimblewimble/grin) implementation.
Initially supported platforms are Linux, Mac, Windows, limited Android and possible web support with help of [egui](https://github.com/emilk/egui) - immediate mode GUI library in pure Rust.
Named by the character [Grim](http://harrypotter.wikia.com/wiki/Grim) - the shape of a large, black, menacing, spectral giant dog.
![image](https://gri.mw/code/GUI/grim/raw/branch/master/img/cover.png)
![image](https://github.com/user-attachments/assets/a925b1c8-02c9-4b08-b888-0315d11138b6)
## Build instructions

View file

@ -11,7 +11,7 @@ android {
minSdk 24
targetSdk 33
versionCode 3
versionName "0.2.3"
versionName "0.2.2"
}
def keystorePropertiesFile = rootProject.file("keystore.properties")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

View file

@ -21,7 +21,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.2.3</string>
<string>0.2.2</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>

View file

@ -63,8 +63,8 @@ function build_apk() {
./gradlew clean
# Build signed apk if keystore exists
if [ ! -f keystore.properties ]; then
./gradlew assembleDebug
apk_path=app/build/outputs/apk/debug/app-debug.apk
./gradlew assembleRelease
apk_path=app/build/outputs/apk/release/app-release.apk
else
./gradlew assembleSignedRelease
apk_path=app/build/outputs/apk/signedRelease/app-signedRelease.apk

View file

@ -339,30 +339,6 @@ impl WalletTransactions {
DOTS_THREE_CIRCLE,
t!("wallets.tx_sending"))
},
TxLogEntryType::ConfirmedCoinbase => {
let tx_h = tx.height.unwrap_or(1) - 1;
if tx_h != 0 {
let left_conf = height - tx_h;
if height >= tx_h && left_conf < COINBASE_MATURITY {
let conf_info = format!("{}/{}",
left_conf,
COINBASE_MATURITY);
format!("{} {} {}",
DOTS_THREE_CIRCLE,
t!("wallets.tx_confirming"),
conf_info
)
} else {
format!("{} {}",
DOTS_THREE_CIRCLE,
t!("wallets.tx_confirming"))
}
} else {
format!("{} {}",
DOTS_THREE_CIRCLE,
t!("wallets.tx_confirming"))
}
},
_ => {
format!("{} {}",
DOTS_THREE_CIRCLE,
@ -377,10 +353,12 @@ impl WalletTransactions {
let tx_h = tx.height.unwrap_or(1) - 1;
if tx_h != 0 {
let left_conf = height - tx_h;
if height >= tx_h && left_conf < COINBASE_MATURITY {
let conf_info = format!("{}/{}",
left_conf,
COINBASE_MATURITY);
let conf_info = if tx_h != 0 && height >= tx_h &&
left_conf < COINBASE_MATURITY {
format!("{}/{}", left_conf, COINBASE_MATURITY)
} else {
"".to_string()
};
format!("{} {} {}",
DOTS_THREE_CIRCLE,
t!("wallets.tx_confirming"),
@ -391,11 +369,6 @@ impl WalletTransactions {
DOTS_THREE_CIRCLE,
t!("wallets.tx_confirmed"))
}
} else {
format!("{} {}",
DOTS_THREE_CIRCLE,
t!("wallets.tx_confirmed"))
}
},
TxLogEntryType::TxSent | TxLogEntryType::TxReceived => {

View file

@ -203,7 +203,6 @@ impl WalletTransactionModal {
if let Ok(_) = res {
self.show_finalization = false;
self.finalize_edit = "".to_string();
self.response_edit = "".to_string();
} else {
self.finalize_error = true;
}

View file

@ -31,7 +31,6 @@ use grin_util::secp::SecretKey;
use hyper::{Body, Uri};
use parking_lot::RwLock;
use sha2::Sha512;
use tls_api_native_tls::TlsConnector;
use tls_api::{TlsConnector as TlsConnectorTrait, TlsConnectorBuilder};
use tokio::time::sleep;
use tor_hscrypto::pk::{HsIdKey, HsIdKeypair};
@ -48,6 +47,14 @@ use tor_llcrypto::pk::ed25519::ExpandedKeypair;
use tor_rtcompat::tokio::TokioNativeTlsRuntime;
use tor_rtcompat::Runtime;
// On aarch64-apple-darwin targets there is an issue with the native and rustls
// tls implementation so this makes it fall back to the openssl variant.
//
// https://gitlab.torproject.org/tpo/core/arti/-/issues/715
#[cfg(not(all(target_vendor = "apple", target_arch = "aarch64")))]
use tls_api_native_tls::TlsConnector;
#[cfg(all(target_vendor = "apple", target_arch = "aarch64"))]
use tls_api_openssl::TlsConnector;
use crate::tor::http::ArtiHttpConnector;
use crate::tor::TorConfig;
@ -73,16 +80,20 @@ pub struct Tor {
impl Default for Tor {
fn default() -> Self {
// Cleanup keys, state and cache on start.
fs::remove_dir_all(TorConfig::keystore_path()).unwrap_or_default();
fs::remove_dir_all(TorConfig::state_path()).unwrap_or_default();
fs::remove_dir_all(TorConfig::cache_path()).unwrap_or_default();
// Create Tor client.
let runtime = TokioNativeTlsRuntime::create().unwrap();
let config = Self::build_config();
let client = TorClient::with_runtime(runtime)
let client = if let Ok(c) = TorClient::with_runtime(runtime)
.config(config.clone())
.create_unbootstrapped().unwrap();
.create_unbootstrapped() {
c
} else {
fs::remove_dir_all(TorConfig::state_path()).unwrap();
fs::remove_dir_all(TorConfig::cache_path()).unwrap();
let runtime = TokioNativeTlsRuntime::create().unwrap();
TorClient::with_runtime(runtime)
.config(config.clone())
.create_unbootstrapped().unwrap()
};
Self {
running_services: Arc::new(RwLock::new(BTreeMap::new())),
starting_services: Arc::new(RwLock::new(BTreeSet::new())),

View file

@ -617,7 +617,7 @@ impl Wallet {
let r_inst = self.instance.as_ref().read();
let instance = r_inst.clone().unwrap();
let mut api = Owner::new(instance, None);
match parse_slatepack(&mut api, None, None, Some(text.clone())) {
return match parse_slatepack(&mut api, None, None, Some(text.clone())) {
Ok(s) => Ok(s.0),
Err(e) => Err(e)
}
@ -714,7 +714,7 @@ impl Wallet {
amount,
minimum_confirmations: config.min_confirmations,
num_change_outputs: 1,
selection_strategy_is_use_all: false,
selection_strategy_is_use_all: true,
..Default::default()
};
let r_inst = self.instance.as_ref().read();
@ -857,7 +857,7 @@ impl Wallet {
src_acct_name: None,
amount: slate.amount,
minimum_confirmations: config.min_confirmations,
selection_strategy_is_use_all: false,
selection_strategy_is_use_all: true,
..Default::default()
};
let r_inst = self.instance.as_ref().read();