Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #78

Open
wants to merge 69 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
c5c0bae
bump conseiljs
dariuszsobkowicz May 26, 2021
9f6e7ae
update softsigner
dariuszsobkowicz Jun 1, 2021
5d09834
bump react and react-native
dariuszsobkowicz Jun 10, 2021
a975944
debugger
dariuszsobkowicz Jun 11, 2021
73a33fe
debug config
dariuszsobkowicz Jun 11, 2021
9c211e3
beacon state
dariuszsobkowicz Jun 11, 2021
4412850
beacon state fixes
dariuszsobkowicz Jun 24, 2021
3b90afa
update beacon sdk
dariuszsobkowicz Jun 28, 2021
ed4d6b2
beacon connection fixes
dariuszsobkowicz Jun 28, 2021
8a0f75e
beacon unavailable status
dariuszsobkowicz Jun 29, 2021
8682f4a
beacon list
dariuszsobkowicz Jun 29, 2021
15b9eda
sort permissions
dariuszsobkowicz Jun 29, 2021
705aa70
beacon transaction and delegation
dariuszsobkowicz Jul 2, 2021
011e917
downgrade react native
dariuszsobkowicz Jul 2, 2021
85a2d1d
ios build fixes
dariuszsobkowicz Jul 2, 2021
60efbb8
android build fixes
dariuszsobkowicz Jul 2, 2021
60d0451
android release
dariuszsobkowicz Jul 5, 2021
ff02c00
beacon ios
dariuszsobkowicz Jul 5, 2021
877d44b
nft standard gallery view
dariuszsobkowicz Jul 5, 2021
327f983
tiles view
dariuszsobkowicz Jul 5, 2021
3f87fcb
nft details screen
dariuszsobkowicz Jul 6, 2021
7727f4d
nft send
dariuszsobkowicz Jul 6, 2021
2bee68d
nft confirm
dariuszsobkowicz Jul 6, 2021
1b11d19
nft state
dariuszsobkowicz Jul 7, 2021
1fd3382
get nft collection
dariuszsobkowicz Jul 7, 2021
51de552
standard view improvements
dariuszsobkowicz Jul 9, 2021
e4e0c26
fix loading
dariuszsobkowicz Jul 9, 2021
6f83b05
details improvements
dariuszsobkowicz Jul 9, 2021
f6a3d55
details screen icons
dariuszsobkowicz Jul 12, 2021
c8ddf51
gallery view switch
dariuszsobkowicz Jul 12, 2021
7d37eff
gallery view state
dariuszsobkowicz Jul 12, 2021
b19458d
unsupported item border
dariuszsobkowicz Jul 12, 2021
2dd2f61
share item url
dariuszsobkowicz Jul 13, 2021
d688645
send nft update
dariuszsobkowicz Jul 13, 2021
8ecb3b9
display full screen image
dariuszsobkowicz Jul 13, 2021
9414d98
bump conseiljs
dariuszsobkowicz Jul 13, 2021
0ecb660
transfer nft
dariuszsobkowicz Jul 13, 2021
8a5e215
fix get collection
dariuszsobkowicz Jul 13, 2021
085d506
beacon fixes
dariuszsobkowicz Jul 14, 2021
43a4721
nft beacon
dariuszsobkowicz Jul 14, 2021
4cee7b3
fix beacon send operations fee
dariuszsobkowicz Jul 15, 2021
e5f4591
cleanup
dariuszsobkowicz Jul 15, 2021
3f09922
fix mint operations
dariuszsobkowicz Jul 15, 2021
c0877bf
home screen update
dariuszsobkowicz Jul 30, 2021
957624d
ios update
dariuszsobkowicz Jul 30, 2021
9598ecd
android update
dariuszsobkowicz Jul 30, 2021
2384208
fix mint parameters
dariuszsobkowicz Aug 2, 2021
9ab65c8
new build
dariuszsobkowicz Aug 2, 2021
cca2d03
- remove warning modal
anonymoussprocket Aug 10, 2021
f10c6f6
- send operation response
anonymoussprocket Aug 10, 2021
640c111
- beacon types wrapper
anonymoussprocket Aug 10, 2021
042ec62
- show fee estimate
anonymoussprocket Aug 10, 2021
e60ab55
- refactor to expose fee estimation
anonymoussprocket Aug 10, 2021
d4314d9
- improved HEN mint processing
anonymoussprocket Aug 11, 2021
266af2d
Merge branch 'nft' of https://github.com/Cryptonomic/honeybadger into…
anonymoussprocket Aug 11, 2021
8635713
- merge cleanup
anonymoussprocket Aug 11, 2021
3e29e87
- dependency version
anonymoussprocket Aug 11, 2021
92afae0
- version
anonymoussprocket Aug 11, 2021
62b7ebc
- bump version
anonymoussprocket Aug 24, 2021
39de330
- android build update
anonymoussprocket Aug 24, 2021
8a9b5a5
- pods update
anonymoussprocket Aug 24, 2021
a36a7f7
- known contract names
anonymoussprocket Aug 24, 2021
9ce7a50
- ios project update
anonymoussprocket Aug 24, 2021
e4ac584
- updated address rendering
anonymoussprocket Aug 24, 2021
a920f0f
- beacon ui rendering
anonymoussprocket Aug 24, 2021
c6742c7
- showing contract name on transaction
anonymoussprocket Aug 24, 2021
7b45226
- settings menu update
anonymoussprocket Aug 24, 2021
b2dbd84
- element id bug fix
anonymoussprocket Aug 24, 2021
5604d1d
Merge pull request #79 from Cryptonomic/nft
anonymoussprocket Aug 24, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*.pbxproj -text
# Windows files should use crlf line endings
# https://help.github.com/articles/dealing-with-line-endings/
*.bat text eol=crlf
1 change: 1 addition & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ module.exports = {
singleQuote: true,
trailingComma: 'all',
tabWidth: 4,
arrowParens: 'avoid',
};
3 changes: 3 additions & 0 deletions _editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Windows files
[*.bat]
end_of_line = crlf
11 changes: 7 additions & 4 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ def jscFlavor = 'org.webkit:android-jsc:+'
def enableHermes = project.ext.react.get("enableHermes", false);

android {
ndkVersion rootProject.ext.ndkVersion

compileSdkVersion rootProject.ext.compileSdkVersion

compileOptions {
Expand All @@ -134,8 +136,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
missingDimensionStrategy 'react-native-camera', 'general'
versionCode 6
versionName "1.8"
versionCode 59
versionName "1.11"
}
splits {
abi {
Expand All @@ -155,7 +157,7 @@ android {
release {
storeFile file('release.keystore')
storePassword ''
keyAlias 'Galleon-Mobile-Release-Key'
keyAlias ''
keyPassword ''
}
}
Expand All @@ -182,11 +184,12 @@ android {
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// https://developer.android.com/studio/build/configure-apk-splits.html
// Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
}

}
Expand Down
7 changes: 6 additions & 1 deletion android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,10 @@

<uses-permission android:name="android.permission.USE_FINGERPRINT"/>

<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
<application
android:usesCleartextTraffic="true"
tools:targetApi="28"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
</manifest>
2 changes: 1 addition & 1 deletion android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:textColor">#000000</item>

Expand Down
11 changes: 6 additions & 5 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@

buildscript {
ext {
buildToolsVersion = "29.0.2"
minSdkVersion = 24
compileSdkVersion = 29
targetSdkVersion = 29
buildToolsVersion = "30.0.2"
ndkVersion = "22.1.7171670"
minSdkVersion = 29
compileSdkVersion = 31
targetSdkVersion = 30
}
repositories {
google()
jcenter()
}
dependencies {
classpath('com.android.tools.build:gradle:4.0.1')
classpath('com.android.tools.build:gradle:4.2.2')

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
3 changes: 3 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ android.useAndroidX=true
android.enableJetifier=true

org.gradle.configureondemand=false
org.gradle.jvmargs=-Xmx4608m

org.gradle.java.home=/Library/Java/JavaVirtualMachines/jdk-11.0.12.jdk/Contents/Home
Binary file modified android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Jul 03 11:04:57 CEST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 2 additions & 0 deletions android/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar


# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
Expand Down Expand Up @@ -129,6 +130,7 @@ fi
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`

JAVACMD=`cygpath --unix "$JAVACMD"`

# We build the pattern for arguments to be converted via cygpath
Expand Down
22 changes: 4 additions & 18 deletions android/gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
if "%ERRORLEVEL%" == "0" goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand All @@ -54,7 +54,7 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init
if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
Expand All @@ -64,28 +64,14 @@ echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*

:end
@rem End local scope for the variables with windows NT shell
Expand Down
3 changes: 3 additions & 0 deletions assets/add.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions assets/bg-gradient.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/edit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions assets/nft.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/rows-view.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/scan.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions assets/send.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/subtract.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions assets/tiles-view.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions ios/BeaconBridge.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
RCT_EXTERN_METHOD(startBeacon)
RCT_EXTERN_METHOD(addPeer:(NSString *)peerId name:(NSString *)name publicKey:(NSString *)publicKey relayServer:(NSString *)relayServer version:(NSString *)version)
RCT_EXTERN_METHOD(sendResponse:(NSString *)payload)
RCT_EXTERN_METHOD(sendError:(NSString *)errorType)
RCT_EXTERN_METHOD(removePermissions)
RCT_EXTERN_METHOD(removePeers)
RCT_EXTERN_METHOD(removeAppMetadata)
Expand Down
40 changes: 32 additions & 8 deletions ios/BeaconBridge.swift
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,24 @@
}
}

@objc
func sendError(_ errorType: String) {
guard let request = awaitingRequest else {
return
}

let response = Beacon.Response.Error(from: request, errorType: Beacon.ErrorType(rawValue: errorType)!)
beaconClient?.respond(with: .error(response)) { result in
switch result {
case .success(_):
print("Sent the response")
case let .failure(error):
print("Failed to send the response, got error: \(error)")
self.sendEvent(withName: "onError", body: ["Failed to send the response, got error: \(error)"])
}
}
}

@objc
func sendResponse(_ payload: String) {
guard let request = awaitingRequest else {
Expand All @@ -154,22 +172,28 @@
}
break
case let .operation(operation):
// let response = Beacon.Response.Operation(from: operation, transactionHash: payload)
// print(response)
// TODO
let response = Beacon.Response.Operation(from: operation, transactionHash: payload)
beaconClient?.respond(with: .operation(response)) { result in
switch result {
case .success(_):
print("Sent the response")
case let .failure(error):
print("Failed to send the response, got error: \(error)")
self.sendEvent(withName: "onError", body: ["Failed to send the response, got error: \(error)"])
}
}
break
case let .signPayload(signPayload):
// let response = Beacon.Response.SignPayload(from: signPayload, signature: payload)
// print(response)
// let response = Beacon.Response.SignPayload(from: signPayload, signature: payload)
// print(response)
// TODO
break
case let .broadcast(broadcast):
// let response = Beacon.Response.Broadcast(from: broadcast, transactionHash: payload)
// print(response)
// let response = Beacon.Response.Broadcast(from: broadcast, transactionHash: payload)
// print(response)
// TODO
break
default:
// TODO
return
}
}
Expand Down
8 changes: 8 additions & 0 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,11 @@ target 'honeybadger' do
# Pods for testing
end
end

post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings["ONLY_ACTIVE_ARCH"] = "NO"
end
end
end
Loading