Skip to content

Commit

Permalink
Merge remote-tracking branch 'fc/develop' into stdevAlDen_t139_hardwa…
Browse files Browse the repository at this point in the history
…re_wallet_signer
  • Loading branch information
olemis committed Jan 23, 2020
2 parents a77accb + d9032fd commit 8023f2a
Show file tree
Hide file tree
Showing 46 changed files with 3,579 additions and 221 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,6 @@ rcc_cgo_*.go
darwin


# Auto-generates go files.

*.pb.go
11 changes: 5 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ services:
- xvfb
go_import_path: github.com/fibercrypto/fibercryptowallet
cache:
directories:
- $GOPATH/src/github.com/therecipe
- $GOPATH/bin
directories:
- $GOPATH/src/github.com/therecipe
- $GOPATH/bin
env:
global:
- XARGS="-screen 0 1024x768x24"
Expand Down Expand Up @@ -126,8 +126,8 @@ notifications:
email: false
webhooks:
urls:
- https://fathomless-fjord-24024.herokuapp.com/notify
- https://coveralls.io/webhook
- https://fathomless-fjord-24024.herokuapp.com/notify
- https://coveralls.io/webhook

before_deploy:
- export VERSION="$(git describe --tags --exact-match HEAD 2> /dev/null)"
Expand All @@ -148,4 +148,3 @@ deploy:
on:
repo: fibercrypto/fibercryptowallet
tags: true

2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- QR code images are buttons
- GUI to add wallets
- GUI to generate new addresses for a wallet

- Added Address Book
17 changes: 12 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Contributing to FiberCrypto projects

We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:

- Submitting a [bug report](https://github.com/fibercrypto/fibercryptowallet/issues/new?labels=bug&template=bug_report.md)
Expand All @@ -8,13 +9,15 @@ We love your input! We want to make contributing to this project as easy and tra
- Becoming a maintainer

## We Develop with Github

We use github to host code, to track issues and feature requests, as well as accept pull requests.

## We Use [Github Flow](https://guides.github.com/introduction/flow/index.html), So All Code Changes Happen Through Pull Requests

Pull requests are the best way to propose changes to the codebase (we use [Github Flow](https://guides.github.com/introduction/flow/index.html)). We actively welcome your pull requests:

1. Fork the repo and create your branch from `master`.
* Branch name should follow the pattern `<USER>_t<ISSUE>_<DESC>` e.g. `olemis_t256_readme_badges` for @olemis to submit a patch to fix issue #256 by adding project badges in `README.md` file.
- Branch name should follow the pattern `<USER>_t<ISSUE>_<DESC>` e.g. `olemis_t256_readme_badges` for @olemis to submit a patch to fix issue #256 by adding project badges in `README.md` file.
2. If you've added code that should be tested, add tests.
3. If you've changed APIs, update the documentation.
4. If contributions add a relevant feature, describe changes in CHANGELOG.md
Expand All @@ -24,33 +27,37 @@ Pull requests are the best way to propose changes to the codebase (we use [Githu
8. Issue that pull request!

## Any contributions you make will be under the GPLv3 Software License

In short, when you submit code changes, your submissions are understood to be under the same [GPLv3 License](https://choosealicense.com/licenses/gpl-3.0/) that covers the project. Feel free to contact the maintainers if that's a concern.

## Report bugs using Github's [issues](https://github.com/fibercrypto/fibercryptowallet/issues)

We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/fibercrypto/fibercryptowallet/issues/new/choose); it's that easy!

## Write bug reports with detail, background, and sample code

[This is an example](http://stackoverflow.com/q/12488905/180626) of a bug report that we think it's not a bad model. Here's [another example from Craig Hockenberry](http://www.openradar.me/11905408), an app developer whom we greatly respect.

**Great Bug Reports** tend to have:

- A quick summary and/or background
- Steps to reproduce
- Be specific!
- Give sample code if you can. [This stackoverflow question](http://stackoverflow.com/q/12488905/180626) includes sample code that *anyone* with a base R setup can run to reproduce what reporter was seeing
- Give sample code if you can. [This stackoverflow question](http://stackoverflow.com/q/12488905/180626) includes sample code that _anyone_ with a base R setup can run to reproduce what reporter was seeing
- What you expected would happen
- What actually happens
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)

People *love* thorough bug reports. I'm not even kidding.
People _love_ thorough bug reports. I'm not even kidding.

## Use a Consistent Coding Style

Code style shall respect golang standards and is checked by a number of linters after running `make lint` from the command line.

## License

By contributing, you agree that your contributions will be licensed under its GPLv3 License.

## References
This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md).


This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md).
146 changes: 64 additions & 82 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@ ignored = [
[prune]
go-tests = true
unused-packages = true

[[constraint]]
branch = "master"
name = "golang.org/x/crypto"
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ ICONSET := resources/images/icons/appIcon/appIcon.iconset
CONVERT := convert
SIPS := sips
ICONUTIL := iconutil
UNAME_S = $(shell uname -s)
DEFAULT_TARGET ?= desktop
DEFAULT_ARCH ?= linux

# Platform-specific switches
ifeq ($(OS),Windows_NT)
Expand Down Expand Up @@ -247,6 +250,7 @@ gen-mocks: ## Generate mocks for interface types
mockery -name Devicer -dir ./vendor/github.com/fibercrypto/skywallet-go/src/skywallet -output ./src/contrib/skywallet/mocks -case underscore
mockery -name DeviceDriver -dir ./vendor/github.com/fibercrypto/skywallet-go/src/skywallet -output ./src/contrib/skywallet/mocks -case underscore
mockery -all -output src/coin/mocks -outpkg mocks -dir src/core
find src/coin/mocks/ -name '*.go' -type f -print0 | xargs -0 -I PATH sed -i '' -e 's/fibercryptowallet/fibercryptowallet/g' PATH

test-skyhw: ## Run Hardware wallet tests
go test github.com/fibercrypto/fibercryptowallet/src/contrib/skywallet
Expand All @@ -258,6 +262,10 @@ test-sky: ## Run Skycoin plugin test suite
test-core: ## Run tests for API core and helpers
go test -cover -timeout 30s github.com/fibercrypto/fibercryptowallet/src/util

test-data: ## Run tests for data package
go test -coverprofile=src/data/coverage.out -timeout 30s github.com/fibercrypto/fibercryptowallet/src/data


test-sky-launch-html-cover:
go test -cover -timeout 30s github.com/fibercrypto/fibercryptowallet/src/coin/skycoin
go test -coverprofile=$(COVERAGEFILE) -timeout 30s github.com/fibercrypto/fibercryptowallet/src/coin/skycoin/models
Expand All @@ -274,7 +282,7 @@ test-cover-travis:

test-cover: clean-test test-sky-launch-html-cover ## Show more details of test coverage

test: clean-test test-core test-sky ## Run project test suite
test: clean-test test-core test-sky test-data## Run project test suite

run-docker: DOCKER_GOPATH=$(shell docker inspect $(DOCKER_QT):$(DEFAULT_ARCH) | grep '"GOPATH=' | head -n1 | cut -d = -f2 | cut -d '"' -f1)
run-docker: install-docker-deps ## Run CMD inside Docker container
Expand Down
19 changes: 6 additions & 13 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (

_ "github.com/fibercrypto/fibercryptowallet/src/coin/skycoin"
_ "github.com/fibercrypto/fibercryptowallet/src/models"
_ "github.com/fibercrypto/fibercryptowallet/src/models/addressBook"
_ "github.com/fibercrypto/fibercryptowallet/src/models/history"
_ "github.com/fibercrypto/fibercryptowallet/src/models/pending"
"github.com/therecipe/qt/core"
Expand Down Expand Up @@ -44,21 +45,13 @@ func main() {
// url := core.NewQUrl3("qrc:/ui/src/ui/main.qml", 0)
url := core.NewQUrl3("src/ui/main.qml", 0) // disable this to make a release

// TODO: Find a way to use a `core.Qt__QueuedConnection`, so we can remove the flag `allOk`
allOk := true
engine.ConnectObjectCreated(func(object *core.QObject, objUrl *core.QUrl) {
if object.Pointer() == nil && url.ToString(0) == objUrl.ToString(0) {
allOk = false
app.Exit(-1) // Ignored because we need a `core.Qt__QueuedConnection`
engine.ConnectSignal(engine.ConnectObjectCreated, func(object *core.QObject, objUrl *core.QUrl) {
if object.Pointer() == nil && url.ToString(0) == objUrl.ToString(0)[len(objUrl.ToString(0)) - len(url.ToString(0)):] {
app.Exit(-1)
}
})
}, core.Qt__QueuedConnection)
engine.Load(url)
splash.QWidget.Close()

// A `core.Qt__QueuedConnection` will allows us to remove the condition bellow, leaving only `app.Exec()`
if allOk == true {
app.Exec()
} else {
app.Exit(-1)
}
app.Exec()
}
1 change: 1 addition & 0 deletions resources/images/icons/user_icon-icons.com_66546.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 8023f2a

Please sign in to comment.