-
Notifications
You must be signed in to change notification settings - Fork 16
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
encointer v0.8.0 #268
encointer v0.8.0 #268
Conversation
export async function subscribeParticipantIndex (msgChannel, cid, cIndex, address) { | ||
return await api.query.encointerCeremonies.participantIndex([cid, cIndex], address, (value) => { | ||
send(msgChannel, value); | ||
}).then((unsub) => unsubscribe(unsub, msgChannel)); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Subscribing to this is no longer supported out of the box, as we have need to query 4 different registries for the participant index. Currently, we only fetch actively from the dart side.
return pIndex; | ||
} | ||
|
||
export async function getParticipantCount (cid, cIndex) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed participantCount; it was not used anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it would be nice to show, actually. "you are not alone"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added to the list encointer/encointer-js#40
lib/page/assets/index.dart
Outdated
@@ -516,10 +535,37 @@ class _AssetsState extends State<Assets> { | |||
); | |||
}, | |||
), | |||
FutureBuilder<bool>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only display a big button on the main-page. I did not bother at all about the UX here because we are amidst heavy changes.
d3dd289
to
d3f2452
Compare
[JS + Dart] remove unused participantCount state and getters [JS + Dart] remove subscribeParticipantIndex, which does no longer exist. [Dart] fix getMeetupLocation [JS] extract locationFromJson function add `hasPendingIssuance` and display in assets page if we have pending issuance. [assets] successfully claim rewards. [types] change all fields to camelCase, as this has bin changed in polkadot-js [types] rename fields meetupLocationIndex -> meetupIndex [GA] use latest encointer-node artifact. [JS] fix tests
d3f2452
to
6998958
Compare
…to fix putting it into the txlist too.
…-fee estimation is displayed on the tx-detail page.
|
||
Re-generate mobx g.dart files | ||
flutter packages pub run build_runner build --delete-conflicting-outputs | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant info: this is displayed10 lines below, too.
@@ -302,50 +303,6 @@ function isTcIsRegisterAttestations (txInfo) { | |||
return TrustedCallMap[txInfo.module][txInfo.call] === 'ceremonies_register_attestations'; | |||
} | |||
|
|||
function _extractEvents (api, result) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outsourced to @encointer
return pIndex; | ||
} | ||
|
||
export async function getParticipantCount (cid, cIndex) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added to the list encointer/encointer-js#40
iconData: Icons.upload_sharp, | ||
onTap: store.encointer.communityBalance != null | ||
? () { | ||
Navigator.pushNamed( | ||
context, | ||
TransferPage.route, | ||
arguments: TransferPageParams( | ||
redirect: AssetPage.route, | ||
redirect: '/', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The app crashed before because we do no longer go from the asset page to transfer page, but from the home page after the UX change.
Observer(builder: (_) { | ||
var dic = I18n.of(context).assets; | ||
|
||
return store.settings.isConnected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Big fat button that does show whether the community income can be issued or not. I wasn't concerned about the UX at all for now, as we are changing things heavily currently.
Padding( | ||
padding: const EdgeInsets.fromLTRB(8.0, 16, 8, 72), | ||
child: Center( | ||
child: Text('transactionByteFee: ${store.settings.transactionByteFee} $baseTokenSymbolView', | ||
style: TextStyle(fontSize: 16, color: Colors.black54)), | ||
), | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the transaction-byte-fee because we show the more meaningful tx-fee-estimate on the next page anyhow.
"token": isCommunityCurrency | ||
? CommunityIdentifier.fromJson(i['params'][1]).toFmtString() | ||
: rootStore.settings.networkState.tokenSymbol, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We store the txs in the 'sent tx list', which does not allow anything else than a string for the token, but in the tx callback the JS crashed before, which is why this error was not noticed.
// user may route to transfer page from asset page | ||
// or from home page with QRCode Scanner | ||
if (routeArgs.redirect == AssetPage.route) { | ||
globalAssetRefreshKey.currentState.show(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer true, we can only go there from the home page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested a local setup with the current node master
Was able to connect and register participant
In the logs I only saw:
I/flutter ( 3162): Image.network error: SocketException: OS Error: Connection refused, errno = 111, address = 10.0.2.2, port = 56466
not sure what this is about. but it doesn't seem to disturb
The error is from the IPFS community icon fetch. With the encointer-dev nework ipfs defaults to the local host. When there is no ipfs-node running this fails, and then it defaults to the current encointer icon. |
Tested: