Skip to content

Commit 9a932bd

Browse files
authored
Merge pull request #38 from codescalers/main_change_imports
Update importing Signer pkg to be from github
2 parents 3663a35 + 9f320ce commit 9a932bd

File tree

9 files changed

+28
-37
lines changed

9 files changed

+28
-37
lines changed

packages/signer/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: signer
22
description: A signer to sign and verify raw data
3-
version: 1.0.0
3+
version: 0.1.0
44

55
environment:
66
sdk: ^3.2.0

packages/tfchain_client/README.md

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -53,30 +53,13 @@ dart run polkadart_cli:generate -v
5353

5454
### Prerequisites
5555

56-
1- To run the tests, you could run it against a local docker image of the TFChain
56+
1- To run the tests against a local docker image of the TFChain:
5757

5858
```bash
5959
docker run --network host ghcr.io/threefoldtech/tfchain:2.8.1 --dev --rpc-cors all --rpc-external --rpc-methods=safe
6060
```
6161

62-
2- Provide your mnemonic as environment variable.
63-
64-
```bash
65-
export MNEMONIC="your-mnemonic"
66-
```
67-
68-
2- provide chain url and the signing type.
69-
By default the chain url is set to `wss://tfchain.dev.grid.tf/ws` and the signing type is `sr25519`. Note that signing type can be either `sr25519` or `ed25519`.
70-
71-
```bash
72-
export URL="chain_url"
73-
```
74-
75-
```bash
76-
export KEYPAIR_TYPE="sr25519"
77-
```
78-
79-
To run the tests, run the following command
62+
2- Then run:
8063

8164
```bash
8265
dart test

packages/tfchain_client/lib/tfchain_client.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import 'package:polkadart/polkadart.dart'
1414
StateApi;
1515
import 'package:polkadart/scale_codec.dart';
1616
import 'package:polkadart_keyring/polkadart_keyring.dart';
17+
import 'package:signer/signer.dart' as Signer;
1718
import 'package:tfchain_client/generated/dev/types/tfchain_runtime/runtime_call.dart';
1819
import 'package:tfchain_client/src/error_mapper.dart';
1920
import 'package:tfchain_client/src/balances.dart' as balance;
@@ -29,7 +30,6 @@ import 'package:tfchain_client/src/tft_bridge.dart';
2930
import 'package:tfchain_client/src/tft_price.dart';
3031
import 'package:tfchain_client/src/twins.dart';
3132
import 'package:bip39/bip39.dart';
32-
import 'package:signer/signer.dart' as Signer;
3333
import 'package:collection/collection.dart';
3434
import 'package:tfchain_client/src/utils.dart';
3535

packages/tfchain_client/pubspec.lock

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -516,9 +516,11 @@ packages:
516516
signer:
517517
dependency: "direct main"
518518
description:
519-
path: "../signer"
520-
relative: true
521-
source: path
519+
path: "packages/signer"
520+
ref: main
521+
resolved-ref: "3663a356a722c082aa0b68d5405f42b3885beedb"
522+
url: "https://github.com/codescalers/tfgrid-sdk-dart.git"
523+
source: git
522524
version: "1.0.0"
523525
source_map_stack_trace:
524526
dependency: transitive

packages/tfchain_client/pubspec.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: tfchain_client
22
description: A sample command-line application.
3-
version: 1.0.0
3+
version: 0.1.0
44

55
environment:
66
sdk: ^3.2.0
@@ -14,7 +14,10 @@ dependencies:
1414
bip39: ^1.0.6
1515
moment_dart: ^2.0.2
1616
signer:
17-
path: ../signer
17+
git:
18+
url: https://github.com/codescalers/tfgrid-sdk-dart.git
19+
ref: main
20+
path: packages/signer
1821
hashlib: ^1.13.1
1922
substrate_metadata: ^1.2.0
2023

packages/tfchain_client/test/contracts_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
@Timeout(Duration(seconds: 50))
21
import 'package:test/test.dart';
32
import 'package:tfchain_client/generated/dev/types/pallet_smart_contract/types/contract.dart';
43
import 'package:tfchain_client/generated/dev/types/pallet_smart_contract/types/contract_lock.dart';

packages/tfchain_client/test/farms_test.dart

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
@Timeout(Duration(seconds: 70))
21
import 'package:test/test.dart';
32
import 'package:tfchain_client/generated/dev/types/tfchain_support/types/farm.dart';
43

@@ -51,7 +50,7 @@ void main() {
5150
} catch (error) {
5251
expect(error, isNotNull);
5352
}
54-
}, timeout: Timeout(Duration(seconds: 70)));
53+
}, timeout: Timeout(Duration(seconds: 50)));
5554

5655
test('Test adding farm ip with equal ip and gateway', () async {
5756
try {
@@ -104,7 +103,7 @@ void main() {
104103
// will fail as the ip already exists
105104
expect(error, isNotNull);
106105
}
107-
}, timeout: Timeout(Duration(seconds: 100)));
106+
}, timeout: Timeout(Duration(seconds: 80)));
108107

109108
test('Test removing farm IP', () async {
110109
try {
@@ -123,7 +122,7 @@ void main() {
123122
} catch (error) {
124123
expect(error, isNull);
125124
}
126-
}, timeout: Timeout(Duration(seconds: 100)));
125+
}, timeout: Timeout(Duration(seconds: 60)));
127126

128127
test('Test adding Stellar Address', () async {
129128
try {
@@ -136,7 +135,7 @@ void main() {
136135
} catch (error) {
137136
expect(error, isNull);
138137
}
139-
}, timeout: Timeout(Duration(seconds: 50)));
138+
}, timeout: Timeout(Duration(seconds: 70)));
140139

141140
tearDown(() async {
142141
if (farmsIps.isNotEmpty) {

pubspec.lock

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -629,8 +629,10 @@ packages:
629629
dependency: "direct main"
630630
description:
631631
path: "packages/signer"
632-
relative: true
633-
source: path
632+
ref: main
633+
resolved-ref: "3663a356a722c082aa0b68d5405f42b3885beedb"
634+
url: "https://github.com/codescalers/tfgrid-sdk-dart.git"
635+
source: git
634636
version: "1.0.0"
635637
source_map_stack_trace:
636638
dependency: transitive
@@ -759,14 +761,14 @@ packages:
759761
sha256: "12391302411737c176b0b5d6491f466b0dd56d4763e347b6714efbaa74d7953d"
760762
url: "https://pub.dev"
761763
source: hosted
762-
version: "0.6.4"
764+
version: "0.6.5"
763765
tfchain_client:
764766
dependency: "direct main"
765767
description:
766768
path: "packages/tfchain_client"
767769
relative: true
768770
source: path
769-
version: "1.0.0"
771+
version: "0.1.0"
770772
typed_data:
771773
dependency: transitive
772774
description:

pubspec.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ dependencies:
1313
coverage: ^1.7.1
1414
melos: ^4.1.0
1515
signer:
16-
path: ./packages/signer
16+
git:
17+
url: https://github.com/codescalers/tfgrid-sdk-dart.git
18+
ref: main
19+
path: packages/signer
1720
substrate_bip39: ^0.4.0
1821
tfchain_client:
1922
path: ./packages/tfchain_client

0 commit comments

Comments
 (0)