GithubHelp home page GithubHelp logo

futurepaul / fluttermint Goto Github PK

View Code? Open in Web Editor NEW
48.0 4.0 11.0 26.47 MB

License: MIT License

Kotlin 0.06% Swift 0.94% Objective-C 0.03% Dart 51.68% CMake 8.05% C++ 9.45% C 3.63% Ruby 1.19% Rust 17.67% Shell 0.32% Nix 6.97%

fluttermint's Introduction

fluttermint's People

Contributors

dpc avatar elsirion avatar futurepaul avatar justinmoon avatar maan2003 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fluttermint's Issues

Could not acquire lock

We've only observed this on MacOS target so far:

[ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: FfiException(RESULT_ERROR, IO error: could not acquire lock on "/Users/futurepaul/Library/Containers/com.example.fluttermint/Data/Documents/client.db/db": Os { code: 35, kind: WouldBlock, message: "Resource temporarily unavailable" }, null)
#0      FlutterRustBridgeBase._transformRust2DartMessage (package:flutter_rust_bridge/src/basic.dart:89:9)
#1      FlutterRustBridgeBase.executeNormal.<anonymous closure> (package:flutter_rust_bridge/src/basic.dart:45:9)
#2      _rootRunUnary (dart:async/zone.dart:1434:47)
#3      _CustomZone.runUnary (dart:async/zone.dart:1335:19)
<asynchronous suspension>
#4      MinimintClientImpl.joinFederation (package:fluttermint/ffi.dart:34:5)
<asynchronous suspension>
#5      SetupJoin.build.joinFederation (package:fluttermint/screens/setup_join.dart:28:7)
<asynchronous suspension>

Revisit this commit

Might want to display something clearer when we can't display a balance. Or make is such that this screen cannot be shown if there isn't a balance to show.

2cd8a0c

Setup CI

It will be easy for Rust, but i am not sure about flutter/dart.

"Oops, something unexpected happened"

Obi and Eric got this on first load. I think this is because they had installed old APK and the database conflicted. Would be interesting to try to replicate this by installing old APK and then installing new APK.

Perhaps we could handle failures to load the database and present a more understandable error. Since we don't support migrations yet, we wouldn't have any option other than offering to delete the database and start over ...

image

Balance not showing correctly.

I got 69 sats from the faucet however my balance is not updated.

I tried going to the receive tab and creating a new invoice and that did not update my balance.

Minor note: the Paid is confusing for a receive. Not sure if I was paid or if I paid someone else.

image

Spend (via sigpay.sirion.io): Invoice expired but fm-sats deducted

Reported by @yojoe in fedimint repo. Moving here because it's a client-side problem.

Everytime I spend fm-sats to pay sigpay.sirion.io invoices, the fm-sats are immediately deducted from my fluttermint wallet, but never seem to reach the BTCPay Server (sigpay.sirion.io). How is that even possible? I thought the LN Gateway can only redeem the fm-sats once it received the payment hash from the target (BTCPay Server)?

Remove clearnet support

Probably don't want this long-term <application android:debuggable="true" android:usesCleartextTraffic="true" />

Save things on Flutter side

IIRC there was some api for storing "settings" type data that we could use? @futurepaul

The main one we need to save right now is client.json containing all information needed to talk to the federation.

But I think there will be more user preferences (e.g. language, do they prefer BTC or sats, etc)

Remove the MacOS build

When we were settting up the project I think we accidentally accepted MacOS as a build target. We will never build for MacOS. Remove it.

Replace qr_code_scanner with mobile_scanner

According to https://pub.dev/packages/qr_code_scanner:

Since the underlying frameworks of this package, zxing for android and MTBBarcodescanner for iOS are both not longer maintaned, this plugin is no longer up to date and in maintenance mode only. Only bug fixes and minor enhancements will be considered.

I am developing a new plugin mobile_scanner that uses the latest version of MLKit for detecting barcodes and QR codes. On Android it also uses the latest version of CameraX, and on iOS the native AVFoundation for best camera performance.

Also mobile_scanner supports macOS which is not supported by qr_code_scanner

Scanning non-lightning QR codes gives weird errors

If you scan a qr that isn't a lightning invoice or doesn't start with lightning: (from what i've tested), it gives you bech32 errors. If you scan a valid bech32 string (ie bitcoin address) you get a length error

nested runtimes?

this happens on ios and android in the receive screen. it seems new so it might be a regression in #66

flutter: checking status for lntbs420n1p3jhky8dqqpp5mpyndj0g4qqpw8uh4gdrytq94ae78zspejghhqcxhrnwcx2558dqsp56rhyn922tv9dgdkaayr2cn22je3xxd9kd0seejpmv0k4g45gme4s9qrsgqcqpjnp4q2a2dkse398yryr3ec94lq0aa80ru3m6gzqchjqx2gvg3rmmcvu5jrzjqvrj8qfkcjxdx5yycnh6m3yxzsa8azn6ek8l3tq98ldtfmatc4gugqqqqqqqqqqqpqqqqqqqqqqqqqqqrcrscjagg7sxlez5ppdfne6vs2dc7l49ckvflaq59hgjs0sv90fdzxf4rm98h90qrvueyqj2pdpkvcpm9hfk2j3cepled63lg4v7srflgqwthk28
thread 'frb_executor' panicked at 'Cannot start a runtime from within a runtime. This happens because a function (like `block_on`) attempted to block the current thread while the thread is being used to drive asynchronous tasks.', /Users/futurepaul/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/scheduler/multi_thread/mod.rs:78:25
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
flutter: Caught error: FfiException(PANIC_ERROR, Cannot start a runtime from within a runtime. This happens because a function (like `block_on`) attempted to block the current thread while the thread is being used to drive asynchronous tasks., null)

[Feature] Previous Transactions

Would be nice to be able to display the previous transactions that had occurred,

I'm assuming we would need to store the spent and unspent mints somewhere on the device?

Not sure if we've setup any sort of database yet

Higher level error handling

Paul was mentioning that Flutter was failing to catch rust errors high in the component hierarchy, so we ended up just handling errors directly where we called the rust bridge.

July 18

Some notes as I try to get the app running again:

  • Ended up using MemDatabase on iOS because I was getting an error that filesystem was read-only.
  • server-n.json
    • Only stores the hbbft ports of their peers. They don't have the websocket ports. I needed connection.replace("400", "500") to get it working ...
    • Has 127.0.0.1 for all host names. Would be better if it had actual IP addresses ...
  • There's a strange issue on Android where the camera shows up the first time app is loaded in fresh simulator, but every subsequent time the camera is just black. Wonder if this is a problem for our QR library, or just a simulator problem. Haven't tried running on android device yet.
  • Would be nice if tmuxinator.sh could use ./cfg so that state isn't lost when we exit. Also need a way to detach from tmux. Can't figure out how to do that right now.

DB not getting saved properly

From @elsirion:

Seems the app doesn't always save the DB? Closed it and lost the last tx in the list. Validated by spending all coins and there being a double spend.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.