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

feat: rollback ark_project and wallet_kit renaming #453

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 7 additions & 7 deletions docs/examples/mobile-wallet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Run it locally with `flutter run` to make sure it is properly configured.
3. Add necessary dependencies

```bash
flutter pub add walletkit hive_flutter hooks_riverpod flutter_dotenv
flutter pub add wallet_kit hive_flutter hooks_riverpod flutter_dotenv
```

4. Create a `.env` file in the root of your wallet_app project
Expand All @@ -44,7 +44,7 @@ Here is the value for `starknet-devnet 0.2.0`

6. Update Android minimun SDK version

`secure_store` package used by `walletkit` require Android minimum SDK version set to at least 23, you need to modify `android/app/build.gradle`:
`secure_store` package used by `wallet_kit` require Android minimum SDK version set to at least 23, you need to modify `android/app/build.gradle`:
```
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
Expand Down Expand Up @@ -93,13 +93,13 @@ Future<void> main() async {
}
```

Now let's intialize `walletkit` and `hive` in our `main` function
Now let's intialize `wallet_kit` and `hive` in our `main` function

```dart
import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:hive_flutter/hive_flutter.dart';
import 'package:walletkit/wallet_kit.dart';
import 'package:wallet_kit/wallet_kit.dart';

Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
Expand Down Expand Up @@ -144,7 +144,7 @@ import 'package:flutter/services.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:hive_flutter/hive_flutter.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:walletkit/wallet_kit.dart';
import 'package:wallet_kit/wallet_kit.dart';

import './screens/home_screen.dart';

Expand Down Expand Up @@ -195,12 +195,12 @@ class WalletApp extends HookConsumerWidget {
}
```

Create a `screens/` folder and add `home_screen.dart` file with a pre-built layout from `walletkit`, as well as `WalletSelector`, `AccountAddress`, `WalletBody` and `SendEthButton`:
Create a `screens/` folder and add `home_screen.dart` file with a pre-built layout from `wallet_kit`, as well as `WalletSelector`, `AccountAddress`, `WalletBody` and `SendEthButton`:

```dart
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:walletkit/wallet_kit.dart';
import 'package:wallet_kit/wallet_kit.dart';

class HomeScreen extends HookConsumerWidget {
const HomeScreen({super.key});
Expand Down
5 changes: 3 additions & 2 deletions examples/nft_marketplace/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import 'package:flutter/material.dart';

import 'package:ark_project/ark_project.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:go_router/go_router.dart';
import 'package:hive_flutter/hive_flutter.dart';
import 'package:nft_marketplace/config.dart';
import 'package:nft_marketplace/screens/home_screen.dart';
import 'package:walletkit/wallet_kit.dart';
import 'package:arkproject/arkproject.dart';
import 'package:wallet_kit/wallet_kit.dart';

void main() async {
await init();
Expand Down
4 changes: 2 additions & 2 deletions examples/nft_marketplace/lib/screens/home_screen.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import 'package:arkproject/arkproject.dart';
import 'package:ark_project/ark_project.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:go_router/go_router.dart';
import 'package:nft_marketplace/config.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';
import 'package:walletkit/wallet_kit.dart';
import 'package:wallet_kit/wallet_kit.dart';

part 'home_screen.g.dart';

Expand Down
6 changes: 3 additions & 3 deletions examples/nft_marketplace/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: nft_marketplace
description: "A new Flutter project."
description: "Starknet NFT marketplace example"
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: "none" # Remove this line if you wish to publish to pub.dev
Expand Down Expand Up @@ -28,11 +28,11 @@ environment:
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
arkproject: ^0.2.0
ark_project: ^0.2.0
starknet: ^0.1.2
starknet_provider: ^0.1.1+1
secure_store: ^0.1.2+1
walletkit: ^0.1.0
wallet_kit: ^0.1.0

flutter:
sdk: flutter
Expand Down
2 changes: 1 addition & 1 deletion examples/wallet_app/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:flutter/services.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:hive_flutter/hive_flutter.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:walletkit/wallet_kit.dart';
import 'package:wallet_kit/wallet_kit.dart';

import './screens/home_screen.dart';

Expand Down
2 changes: 1 addition & 1 deletion examples/wallet_app/lib/screens/home_screen.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:walletkit/wallet_kit.dart';
import 'package:wallet_kit/wallet_kit.dart';

class HomeScreen extends HookConsumerWidget {
const HomeScreen({super.key});
Expand Down
2 changes: 1 addition & 1 deletion examples/wallet_app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ environment:
dependencies:
flutter:
sdk: flutter
walletkit: ^0.1.0
wallet_kit: ^0.1.0
cupertino_icons: ^1.0.2
hive_flutter: ^1.1.0
hooks_riverpod: ^2.6.1
Expand Down
2 changes: 1 addition & 1 deletion packages/ark_project/example/ark_example.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:arkproject/arkproject.dart';
import 'package:ark_project/ark_project.dart';
import 'package:dotenv/dotenv.dart';

final env = DotEnv(includePlatformEnvironment: true)..load();
Expand Down
2 changes: 1 addition & 1 deletion packages/ark_project/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: arkproject
name: ark_project
description: Ark SDK for Dart and Flutter apps.
version: 0.2.0
repository: https://github.com/focustree/starknet.dart
Expand Down
2 changes: 1 addition & 1 deletion packages/wallet_kit/lib/widgets/nft_details.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:arkproject/arkproject.dart';
import 'package:ark_project/ark_project.dart';
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';
Expand Down
2 changes: 1 addition & 1 deletion packages/wallet_kit/lib/widgets/nft_list.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:arkproject/arkproject.dart';
import 'package:ark_project/ark_project.dart';
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';
Expand Down
6 changes: 3 additions & 3 deletions packages/wallet_kit/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: walletkit
description: A new Flutter package project.
name: wallet_kit
description: Wallet Kit.
version: 0.1.0
homepage: "https://starknetdart.dev"

Expand All @@ -8,7 +8,7 @@ environment:
flutter: ">=1.17.0"

dependencies:
arkproject: ^0.2.0
ark_project: ^0.2.0
starknet: ^0.1.2
starknet_provider: ^0.1.1+1
secure_store: ^0.1.2+1
Expand Down
2 changes: 1 addition & 1 deletion packages/wallet_kit/test/utils/format_address_test.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:walletkit/utils/index.dart';
import 'package:wallet_kit/utils/index.dart';

void main() {
test('formatAddress should format long addresses starting with "0x"', () {
Expand Down
2 changes: 1 addition & 1 deletion packages/wallet_kit/test/utils/group_by_test.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:walletkit/utils/group_by.dart';
import 'package:wallet_kit/utils/group_by.dart';

void main() {
test('groupBy should group values by the given key', () {
Expand Down