Skip to content

Commit

Permalink
V5.9.0
Browse files Browse the repository at this point in the history
Enables importing Substrate networks, interacting with metadata, creating extrinsics, querying storage, and making runtime calls.
Fully compatible with Web3 on Chrome, Brave, Firefox, Edge, Android, and macOS for substrate
  • Loading branch information
mrtnetwork committed Jan 23, 2025
1 parent feeeeb2 commit f5822ff
Show file tree
Hide file tree
Showing 464 changed files with 137,191 additions and 192,127 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,11 @@ Welcome to MRT Wallet, the open-source wallet crafted for the decentralized futu



### Kusama
### Substrate

- **Features:** Seamless support for Kusama transactions.

### Polkadot

- **Features:** Seamless support for Polkadot transactions.
- **Features:** Provides seamless support for Kusama, Polkadot transactions, and standalone chains.
- **Highlights:** Enables importing Substrate networks, interacting with metadata, creating extrinsics, querying storage, and making runtime calls.
- **Web3 Support** Fully compatible with Web3 on Chrome, Brave, Firefox, Edge, Android, and macOS.

### Monero

Expand Down
2 changes: 1 addition & 1 deletion mrt_native_support/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ packages:
path: "../../../blockchain_utils"
relative: true
source: path
version: "3.5.0"
version: "4.0.0"
boolean_selector:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion mrt_native_support/lib/io/io_platforms.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library io_platform_interface;
library;

import 'dart:async';
import 'dart:io';
Expand Down
7 changes: 6 additions & 1 deletion mrt_native_support/lib/models/device/models/config.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import 'package:mrt_native_support/models/device/models/platform.dart';

class MRTAPPConfig {
static const int _storageVersion = 1;
final AppPlatform platform;
final bool hasBarcodeScanner;
const MRTAPPConfig({required this.platform, required this.hasBarcodeScanner});
final int storageVersion;
const MRTAPPConfig(
{required this.platform,
required this.hasBarcodeScanner,
this.storageVersion = _storageVersion});
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ enum WalletEventTypes {
ping,
popup,
windowId,
openExtension;
openExtension,
background;

static WalletEventTypes fromName(String name) {
return values.firstWhere((e) => e.name == name,
Expand Down
38 changes: 37 additions & 1 deletion mrt_native_support/lib/models/size/models/rect.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,45 @@ class WidgetRect {
final double width;
final double x;
final double y;
final double? devicePixelRatio;
const WidgetRect(
{required this.height,
required this.width,
required this.x,
required this.y});
required this.y,
this.devicePixelRatio});

static WidgetRect? fromString(String? v) {
if (v == null) return null;
try {
final numbers = v.split('_').map((e) => double.tryParse(e)).toList();
return WidgetRect(
height: numbers[0]!,
width: numbers[1]!,
x: numbers[2]!,
y: numbers[3]!,
devicePixelRatio: numbers[4]!);
} catch (_) {
return null;
}
}

WidgetRect copyWith(
{double? height,
double? width,
double? x,
double? y,
double? devicePixelRatio}) {
return WidgetRect(
height: height ?? this.height,
width: width ?? this.width,
x: x ?? this.x,
y: y ?? this.y,
devicePixelRatio: devicePixelRatio ?? this.devicePixelRatio);
}

@override
String toString() {
return "${height}_${width}_${x}_${y}_$devicePixelRatio";
}
}
1 change: 0 additions & 1 deletion mrt_native_support/lib/mrt_native_support.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ abstract class MrtPlatformInterface extends PlatformInterface {
Future<void> stopBarcodeScanner();
Future<bool> hasBarcodeScanner();
Future<MRTAPPConfig> getConfig();

Future<String?> readClipboard();
Future<bool> writeClipboard(String text);
}
Expand Down
2 changes: 2 additions & 0 deletions mrt_native_support/lib/web/api/chrome/api/core.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ ChromeAPI get extension {
return _browser;
}

bool get isMozila => _browserNullabe != null;

bool get isExtension =>
_chromeNullabe?.runtimeNullable?.idNullabe != null ||
_browserNullabe?.runtimeNullable?.idNullabe != null;
23 changes: 23 additions & 0 deletions mrt_native_support/lib/web/api/chrome/api/windows.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ extension type ChromeWindows._(JSObject _) {
external JSPromise<ChromeWindow> create(ChromeWindowsCreateData? ccreateData);
external JSPromise<ChromeWindow> getCurrent(
ChromeWindowsQueryOptions? queryOptions);
external JSPromise<ChromeWindow> getLastFocused(
ChromeWindowsQueryOptions? queryOptions);
external JSPromise<ChromeWindow> get(
int windowId, ChromeWindowsQueryOptions? queryOptions);
external JSPromise<JSArray<ChromeWindow>> getAll(
ChromeWindowsQueryOptions? queryOptions);
external JSPromise<ChromeWindow> update(
int windowId, ChromeWindowsUpdateInfo? updateInfo);
Future<ChromeWindow> create_(
Expand Down Expand Up @@ -69,6 +73,25 @@ extension type ChromeWindows._(JSObject _) {
return await future;
}

Future<ChromeWindow> getLastFocused_(
{bool? populate, List<String>? windowTypes}) async {
final future = getLastFocused(ChromeWindowsQueryOptions(
populate: populate,
windowTypes: windowTypes?.map((e) => e.toJS).toList().toJS))
.toDart;
return await future;
}

Future<List<ChromeWindow>> getAll_(
{bool? populate, List<String>? windowTypes}) async {
final future = getAll(ChromeWindowsQueryOptions(
populate: populate,
windowTypes: windowTypes?.map((e) => e.toJS).toList().toJS))
.toDart;
final r = await future;
return r.toDart;
}

Future<ChromeWindow> getCurrent_(
{bool? populate, List<String>? windowTypes}) async {
final future = getCurrent(ChromeWindowsQueryOptions(
Expand Down
2 changes: 1 addition & 1 deletion mrt_native_support/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
flutter:
sdk: flutter
plugin_platform_interface: ^2.1.8
blockchain_utils: ^4.0.0
blockchain_utils: ^4.0.1
# blockchain_utils:
# path: ../../../blockchain_utils

Expand Down
12 changes: 12 additions & 0 deletions mrt_wallet/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
// "args": ["-d", "chrome","--web-port", "8000"],
{
"name": "web",
"request": "launch",
"type": "dart",
"args": [
"-d",
"chrome",
"--web-port",
"8080"
]
},
{
"name": "mrt_wallet",
"request": "launch",
Expand Down
7 changes: 6 additions & 1 deletion mrt_wallet/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,10 @@
"**/Thumbs.db": true,
"**/.rmv/catalog/**": true,
"*/_*": false
}
},
"dart.includeDependenciesInWorkspaceSymbols": false,
"dart.showExtensionRecommendations": false,
"dart.devToolsReuseWindows": false,
"dart.enableServerSnippets": false,
"dart.showTestCodeLens": false
}
Empty file.
Binary file added mrt_wallet/assets/image/acala.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mrt_wallet/assets/image/astar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mrt_wallet/assets/image/cfg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mrt_wallet/assets/image/moonbeam.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mrt_wallet/assets/image/moonriver.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mrt_wallet/assets/image/substrate.png
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 f5822ff

Please sign in to comment.