Skip to content

Commit

Permalink
Merge pull request #60 from polkawallet-io/develop
Browse files Browse the repository at this point in the history
bug fix
  • Loading branch information
RomeroYang authored Jul 9, 2020
2 parents 15a10c0 + d67f419 commit 3a603de
Show file tree
Hide file tree
Showing 16 changed files with 407 additions and 380 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# 0.8.3
- add tx sending with tips
- fix Acala token transfer history bug
- fix UI bugs of Acala pages
- fix staking history display bug
- fix scan to transfer balance display

# 0.8.2
- add acala TC4 support
Expand Down
8 changes: 4 additions & 4 deletions android/app/appcenter-post-clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ sudo installer -store -pkg "$HOME/Downloads/node-installer.pkg" -target "/"
cd ./lib/js_service_kusama && yarn install && yarn run build && cd ../..
cd ./lib/js_service_acala && yarn install && yarn run build && cd ../..

flutter build apk --release
flutter build appbundle --release
flutter build apk --release --flavor prod
flutter build appbundle --release --flavor prod

# copy the APK where AppCenter will find it
mkdir -p android/app/build/outputs/apk/; mv build/app/outputs/apk/release/app-release.apk $_
mkdir -p android/app/build/outputs/apk/; mv build/app/outputs/apk/prod/release/app-prod-release.apk $_
# copy the AAB where AppCenter will find it
mkdir -p android/app/build/outputs/bundle/; mv build/app/outputs/bundle/release/app-release.aab $_
mkdir -p android/app/build/outputs/bundle/; mv build/app/outputs/bundle/prodRelease/app-prod-release.aab $_
6 changes: 2 additions & 4 deletions lib/common/components/currencyWithIcon.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ class CurrencyWithIcon extends StatelessWidget {
CurrencyWithIcon(
this.symbol, {
this.textStyle,
this.textWidth,
this.trailing,
this.mainAxisAlignment,
});

final String symbol;
final double textWidth;
final TextStyle textStyle;
final MainAxisAlignment mainAxisAlignment;
final Widget trailing;
Expand All @@ -27,8 +25,8 @@ class CurrencyWithIcon extends StatelessWidget {
child:
Image.asset('assets/images/assets/${symbol.toUpperCase()}.png'),
),
Container(
width: textWidth ?? 64,
Expanded(
flex: 0,
child: Text(
symbol,
style: textStyle,
Expand Down
2 changes: 1 addition & 1 deletion lib/common/consts/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ const String acala_stable_coin = 'AUSD';
const String acala_stable_coin_view = 'aUSD';

/// test app versions
const String app_beta_version = '0.8.3-beta.1';
const String app_beta_version = '0.8.3-beta.2';
6 changes: 6 additions & 0 deletions lib/js_service_kusama/src/service/gov.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ async function fetchReferendums(address) {
const callData = api.registry.findMetaCall(image.proposal.callIndex);
const parsedMeta = _extractMetaData(callData.meta);
image.proposal = image.proposal.toHuman();
if (image.proposal.method == "setCode") {
const args = image.proposal.args;
image.proposal.args = [
args[0].slice(0, 16) + "..." + args[0].slice(args[0].length - 16),
];
}

const changes = approxChanges(status.threshold, sqrtElectorate, {
votedAye,
Expand Down
86 changes: 50 additions & 36 deletions lib/page-acala/earn/addLiquidityPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ class _AddLiquidityPageState extends State<AddLiquidityPage> {
width: inputWidth,
child: CurrencyWithIcon(
token,
textWidth: 48,
textStyle: Theme.of(context).textTheme.headline4,
),
),
Expand All @@ -192,7 +191,6 @@ class _AddLiquidityPageState extends State<AddLiquidityPage> {
width: inputWidth,
child: CurrencyWithIcon(
acala_stable_coin_view,
textWidth: 48,
textStyle: Theme.of(context).textTheme.headline4,
),
),
Expand Down Expand Up @@ -289,39 +287,47 @@ class _AddLiquidityPageState extends State<AddLiquidityPage> {
],
),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
width: inputWidth,
child: Text(
'${dicAssets['balance']}: ${Fmt.priceFloorBigInt(balanceTokenUser, lengthMax: 3)}',
style: TextStyle(
fontSize: 14,
color: Theme.of(context).unselectedWidgetColor,
Padding(
padding: EdgeInsets.only(top: 8),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
width: inputWidth,
child: Text(
'${dicAssets['balance']}: ${Fmt.priceFloorBigInt(balanceTokenUser, lengthMax: 3)}',
style: TextStyle(
fontSize: 14,
color:
Theme.of(context).unselectedWidgetColor,
),
),
),
),
Container(
width: inputWidth,
child: Text(
'${dicAssets['balance']}: ${Fmt.priceFloorBigInt(balanceStableCoinUser, lengthMax: 2)}',
style: TextStyle(
fontSize: 14,
color: Theme.of(context).unselectedWidgetColor,
Container(
width: inputWidth,
child: Text(
'${dicAssets['balance']}: ${Fmt.priceFloorBigInt(balanceStableCoinUser, lengthMax: 2)}',
style: TextStyle(
fontSize: 14,
color:
Theme.of(context).unselectedWidgetColor,
),
),
),
)
],
)
],
),
),
Divider(),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text(
dic['dex.rate'],
style: TextStyle(
color: Theme.of(context).unselectedWidgetColor),
Expanded(
child: Text(
dic['dex.rate'],
style: TextStyle(
color: Theme.of(context).unselectedWidgetColor,
),
),
),
Text(
'1 $token = ${Fmt.doubleFormat(swapRatio, length: 2)} $acala_stable_coin_view'),
Expand All @@ -330,22 +336,30 @@ class _AddLiquidityPageState extends State<AddLiquidityPage> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text(
dic['earn.pool'],
style: TextStyle(
color: Theme.of(context).unselectedWidgetColor),
Expanded(
child: Text(
dic['earn.pool'],
style: TextStyle(
color:
Theme.of(context).unselectedWidgetColor),
),
),
Text(
'${Fmt.doubleFormat(amountToken)} $token + ${Fmt.doubleFormat(amountStableCoin, length: 2)} $acala_stable_coin_view'),
'${Fmt.doubleFormat(amountToken)} $token\n+ ${Fmt.doubleFormat(amountStableCoin, length: 2)} $acala_stable_coin_view',
textAlign: TextAlign.right,
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text(
dic['earn.share'],
style: TextStyle(
color: Theme.of(context).unselectedWidgetColor),
Expanded(
child: Text(
dic['earn.share'],
style: TextStyle(
color:
Theme.of(context).unselectedWidgetColor),
),
),
Text(Fmt.ratio(userShareNew)),
],
Expand Down
37 changes: 24 additions & 13 deletions lib/page-acala/earn/withdrawLiquidityPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,13 @@ class _WithdrawLiquidityPageState extends State<WithdrawLiquidityPage> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text(
dic['dex.rate'],
style: TextStyle(
color: Theme.of(context).unselectedWidgetColor),
Expanded(
child: Text(
dic['dex.rate'],
style: TextStyle(
color: Theme.of(context).unselectedWidgetColor,
),
),
),
Text(
'1 $token = ${Fmt.doubleFormat(swapRatio, length: 2)} $acala_stable_coin_view'),
Expand All @@ -267,22 +270,30 @@ class _WithdrawLiquidityPageState extends State<WithdrawLiquidityPage> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text(
dic['earn.pool'],
style: TextStyle(
color: Theme.of(context).unselectedWidgetColor),
Expanded(
child: Text(
dic['earn.pool'],
style: TextStyle(
color: Theme.of(context).unselectedWidgetColor,
),
),
),
Text(
'${Fmt.doubleFormat(poolToken)} $token + ${Fmt.doubleFormat(poolStableCoin, length: 2)} $acala_stable_coin_view'),
'${Fmt.doubleFormat(poolToken)} $token\n+ ${Fmt.doubleFormat(poolStableCoin, length: 2)} $acala_stable_coin_view',
textAlign: TextAlign.right,
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text(
dic['earn.share'],
style: TextStyle(
color: Theme.of(context).unselectedWidgetColor),
Expanded(
child: Text(
dic['earn.share'],
style: TextStyle(
color: Theme.of(context).unselectedWidgetColor,
),
),
),
Text(Fmt.ratio(shareRatioNew)),
],
Expand Down
Loading

0 comments on commit 3a603de

Please sign in to comment.