Skip to content

Commit

Permalink
Merge pull request #6 from LtbLightning/Post-Testing-Changes
Browse files Browse the repository at this point in the history
Post testing changes
  • Loading branch information
BitcoinZavior authored Mar 1, 2024
2 parents e537a9a + 1a72683 commit 76fbd36
Show file tree
Hide file tree
Showing 24 changed files with 17,789 additions and 1,575 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/precompile_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
PRIVATE_KEY: ${{ secrets.RELEASE_PRIVATE_KEY }}
- name: Precompile (with Android)
if: (matrix.os == 'ubuntu-20.04')
run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=LtbLightning/payjoin-flutter --android-sdk-location=/usr/local/lib/android/sdk --android-ndk-version=26.1.10909125 --android-min-sdk-version=23
run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=LtbLightning/payjoin-flutter --android-sdk-location=/usr/local/lib/android/sdk --android-ndk-version=24.0.8215888 --android-min-sdk-version=23
working-directory: cargokit/build_tool
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
Expand Down
6 changes: 3 additions & 3 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class _MyAppState extends State<MyApp> {

Future<Uri> buildPjUri(double amount, String address, String pj) async {
try {
final pjUri = "${address}amount=${amount / 100000000.0}&pj=$pj";
final pjUri = "bitcoin:$address?amount=${amount / 100000000.0}&pj=$pj";
return await Uri.fromStr(uri: pjUri);
} catch (e) {
debugPrint(e.toString());
Expand All @@ -46,8 +46,8 @@ class _MyAppState extends State<MyApp> {
onPressed: () async {
final uri = await buildPjUri(
10000000,
"bcrt1qaux734vuhykww9632v8cmdnk7z2mw5lsf74v6k",
"https://example.com");
"12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX",
"https://testnet.demo.btcpayserver.org/BTC/pj");
print(await uri.address());
},
child: const Text("Build PjUri"))
Expand Down
17 changes: 17 additions & 0 deletions example/lib/payjoin_library.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import 'package:flutter/cupertino.dart';
import 'package:payjoin_flutter/payjoin.dart';

class PayjoinLibrary {
static const PJ_URL = "https://localhost:8088";
static const OH_RELAY = "https://localhost:8088";
static const LOCAL_CERT_FILE = "localhost.der";
Future<Uri> buildPjUri(double amount, String address, String pj) async {
try {
final pjUri = "bitcoin:$address?amount=${amount / 100000000.0}&pj=$pj";
return await Uri.fromStr(uri: pjUri);
} catch (e) {
debugPrint(e.toString());
rethrow;
}
}
}
4 changes: 2 additions & 2 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ packages:
dependency: transitive
description:
name: flutter_rust_bridge
sha256: "7bdcbe0dc20a85f743bfc1a8ee940656d57beeccb0da44b0e2c8271535b61ae5"
sha256: db2c6aa5c255ba5dcafefb3cc3db65733c5b6b5f68ba0816688748cf2132cfa3
url: "https://pub.dev"
source: hosted
version: "2.0.0-dev.24"
version: "2.0.0-dev.25"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down
3 changes: 2 additions & 1 deletion flutter_rust_bridge.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# See `pure_dart` example for comments on the configs

rust_input: rust/src/api/*.rs
dart_output: lib/src/generated/
full_dep: true
c_output: ios/Classes/frb_generated.h
dart_entrypoint_class_name: PayjoinCore
4 changes: 4 additions & 0 deletions ios/Classes/EnforceBundling.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
public func dummyMethodToEnforceBundling() -> Int64 {
return dummy_method_to_enforce_bundling()
}
let dummyVar = dummyMethodToEnforceBundling();
Loading

0 comments on commit 76fbd36

Please sign in to comment.