Skip to content

Commit

Permalink
Merge pull request #132 from ultiledger/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
ult-zhiwei authored Apr 9, 2020
2 parents 9afa1b3 + 01b10c8 commit c066004
Show file tree
Hide file tree
Showing 33 changed files with 15,105 additions and 122 deletions.
2 changes: 1 addition & 1 deletion .browserslistrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
> 1%
last 2 versions
last 5 versions
not ie <= 8
14,970 changes: 14,970 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"ripple-address-codec": "^4.0.0",
"ripple-lib": "^1.4.1",
"stellar-sdk": "^0.11.0",
"vant": "^1.4.3",
"vant": "^1.6.28",
"vee-validate": "^2.2.15",
"vue": "^2.6.10",
"vue-clipboard2": "^0.3.1",
Expand All @@ -34,7 +34,7 @@
"devDependencies": {
"@vue/cli-plugin-babel": "^3.12.1",
"@vue/cli-plugin-eslint": "^3.12.1",
"@vue/cli-service": "^3.0.5",
"@vue/cli-service": "^3.12.1",
"babel-plugin-import": "^1.12.2",
"bip39": "^2.5.0",
"bitcoinjs-lib": "^4.0.2",
Expand All @@ -48,7 +48,7 @@
"md5": "^2.2.1",
"moment": "^2.24.0",
"node-sass": "^4.13.0",
"sass-loader": "^7.1.0",
"sass-loader": "^7.3.1",
"vue-i18n": "^8.15.0",
"vue-template-compiler": "^2.6.10"
}
Expand Down
2 changes: 1 addition & 1 deletion postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
plugins: {
autoprefixer: {browsers: 'last 5 version'}
autoprefixer: {}
}
}
1 change: 1 addition & 0 deletions src/core/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export const setBalances = ({commit, state, dispatch}, params) => {
// }
resolve();
}).catch(err => {
console.log(err);
reject(err);
});
});
Expand Down
13 changes: 8 additions & 5 deletions src/core/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,20 @@ const state = {
{value: 'https://horizon-testnet.stellar.org', type: 'test'}
],
[AccountType.ripple]: [
{value: 'wss://xrpl.ws', type: 'public'},
{value: 'wss://ws.foxcny.com', type: 'public'},
{value: 'wss://ws2.foxcny.com', type: 'public'},
{value: 'wss://s1.ripple.com', type: 'public'},
{value: 'wss://s-east.ripple.com', type: 'public'},
{value: 'wss://s-west.ripple.com', type: 'public'},
{value: 'wss://s2.ripple.com', type: 'public'},
{value: 'wss://rippled.xrptipbot.com', type: 'public'},
{value: 'wss://s2.ripple.com', type: 'public'},
{value: 'wss://s.altnet.rippletest.net:51233', type: 'test'}
],
[AccountType.ethereum]: [
// {value: 'https://mainnet.infura.io/', type: 'public'},
// {value: 'https://rinkeby.infura.io/', type: 'test'}
{value: 'wss://mainnet.infura.io/ws', type: 'public'},
{value: 'wss://ethapi.foxcny.com/ws/v3/508b5431b89041d18256f8d7d91558d1', type: 'public'},
{value: 'wss://mainnet.infura.io/ws/v3/508b5431b89041d18256f8d7d91558d1', type: 'public'},
//{value: 'https://mainnet-eth.token.im/', type: 'public'},
{value: 'wss://rinkeby.infura.io/ws', type: 'test'}
],
Expand All @@ -61,8 +64,8 @@ const state = {
mytokenApi: 'https://api.mytokenapi.com', // mytoken-api获取行情
network: {
[AccountType.stellar]: 'https://horizon.stellar.org',
[AccountType.ripple]: 'wss://s1.ripple.com',
[AccountType.ethereum]: 'wss://mainnet.infura.io/ws',
[AccountType.ripple]: 'wss://xrpl.ws',
[AccountType.ethereum]: 'wss://mainnet.infura.io/ws/v3/508b5431b89041d18256f8d7d91558d1',
[AccountType.bitcoin]: 'https://blockchain.info'
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/acct/acct-detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
</div>
</pl-block>
<div class="single-btn margin-bottom margin-top" v-if="delFlag!=='0'">
<van-button size="large" round type="primary" @click="toCheckPassword('3')" v-text="$t('acct.deleteWallet')"></van-button>
<van-button size="large" round type="primary" @click="toCheckPassword('3')" :text="$t('acct.deleteWallet')"></van-button>
</div>
</pl-content-block>

Expand Down
2 changes: 1 addition & 1 deletion src/pages/address/address-add.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
</div>

<div class="single-btn">
<van-button size="large" round @click="saveAddress" type="primary" v-text="$t('address.save')"></van-button>
<van-button size="large" round @click="saveAddress" type="primary" :text="$t('address.save')"></van-button>
</div>
<coin-type-select ref="coinTypeSelect" @done="setType"></coin-type-select>
</van-popup>
Expand Down
10 changes: 5 additions & 5 deletions src/pages/assets/asset-detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,21 @@
<pl-stick :offset-bottom="0">
<van-row class="van-hairline--top" v-if="isStellar">
<van-col span="8">
<van-button size="large" class="plat-btn" type="import" @click.native="receiveAsset" v-text="$t('common.receivables')"></van-button>
<van-button size="large" class="plat-btn" type="import" @click.native="receiveAsset" :text="$t('common.receivables')"></van-button>
</van-col>
<van-col span="8">
<van-button size="large" class="plat-btn" type="gray" @click.native="exchange" v-text="$t('common.exchange')"></van-button>
<van-button size="large" class="plat-btn" type="gray" @click.native="exchange" :text="$t('common.exchange')"></van-button>
</van-col>
<van-col span="8">
<van-button size="large" class="plat-btn" type="export" @click.native="transfer" v-text="$t('common.transferAccounts')"></van-button>
<van-button size="large" class="plat-btn" type="export" @click.native="transfer" :text="$t('common.transferAccounts')"></van-button>
</van-col>
</van-row>
<van-row class="van-hairline--top" v-else>
<van-col span="12">
<van-button size="large" class="plat-btn" type="import" @click.native="receiveAsset" v-text="$t('common.receivables')"></van-button>
<van-button size="large" class="plat-btn" type="import" @click.native="receiveAsset" :text="$t('common.receivables')"></van-button>
</van-col>
<van-col span="12">
<van-button size="large" class="plat-btn" type="export" @click.native="transfer" v-text="$t('common.transferAccounts')"></van-button>
<van-button size="large" class="plat-btn" type="export" @click.native="transfer" :text="$t('common.transferAccounts')"></van-button>
</van-col>
</van-row>
</pl-stick>
Expand Down
39 changes: 23 additions & 16 deletions src/pages/assets/asset-item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@
&nbsp;
<van-icon
v-if="!$store.state.setting.privacyMode"
name="password-view"
name="eye-o"
@click="setMode(true)"
/>
<van-icon v-else name="password-not-view" @click="setMode(false)" />
<van-icon v-else name="closed-eye" @click="setMode(false)" />
</span>
</div>
<span
Expand Down Expand Up @@ -176,11 +176,10 @@ export default {
components: {
accountActivated
},
// created() {
// aa(){
// conosle.log(this.assets())
// }
// },
created() {
console.log(this.data);
},
computed: {
showAddBtn() {
if (this.data && this.data.type === AccountType.bitcoin) {
Expand Down Expand Up @@ -263,6 +262,7 @@ export default {
} else if (result > 0 && result < 1) {
result = result.toFixed(4);
}
return Number(result);
},
setStatAmtClass() {
Expand All @@ -280,23 +280,29 @@ export default {
setMode(val) {
this.$store.dispatch("setPrivacyMode", val);
},
setActive() {
async setActive() {
if (!this.balances || this.balances.length === 0) {
this.loading = true;
}
let params = { ...this.data, setBalance: false };
this.$store.dispatch("setAccount", params);
this.$store
.dispatch("setBalances", this.data)
await this.$store.dispatch("setAccount", params);
this.$store.dispatch("setBalances", this.data)
.then(() => {
this.$emit("setSwipeHeight");
this.loading = false;
})
.catch(err => {
console.info(err);
this.$emit("setSwipeHeight");
})
.catch(() => {
this.loading = false;
this.$emit("setSwipeHeight");
});
if(this.data.type === AccountType.ripple){
setTimeout(()=>{
this.loading = false;
this.$emit("setSwipeHeight");
},2000);
}
// this.$wallet.getInstance().getTrustlines('rDDJqnFgTNnR4c4u8EAAskpet4LUYUZm4A').then(ret => {
// console.info(ret);
// });
Expand All @@ -317,7 +323,8 @@ export default {
this.$emit("addAssets");
},
toTrade() {
if (this.balances.length > 1 || this.data.type === AccountType.ripple) { // fix#86
if (this.balances.length > 1 || this.data.type === AccountType.ripple) {
// fix#86
this.$emit("toTrade");
} else {
this.$dialog
Expand Down
11 changes: 9 additions & 2 deletions src/pages/assets/assets.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,13 @@ export default {
this.$refs["assetItem"] &&
this.$refs["assetItem"][this.index]
) {
console.log(this.$refs["assetItem"]);
this.$refs["assetItem"][this.index].setActive();
}
}
},
methods: {
shortType(type) {
return coins[type].symbol || type;
Expand Down Expand Up @@ -259,11 +262,15 @@ export default {
}
},
mounted() {
// this.$refs['assetItem'][this.index].setActive();
//jimjay
// this.$refs["assetItem"][this.index].setActive();
},
created() {
// this.wallets = [];
console.log(this.index);
this.setWallets();
// this.wallets = [];
console.log(this.index);
}
};
</script>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/exchange/stellar-exchange.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
class="plat-btn"
@click="showPasswordDialog"
type="primary"
v-text="$t('common.exchange')"></van-button>
:text="$t('common.exchange')"></van-button>
</pl-stick>
</van-popup>
<van-popup
Expand Down
74 changes: 36 additions & 38 deletions src/pages/find/application-item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@
@click.native="to(item)"
class="item-block"
v-for="(item, index) in datas"
:key="index">
:key="index"
>
<div slot="title" class="card-title">
<div class="normal-font">{{item.title}}</div>
<div class="small-font text-ellipsis text-main">{{item.subTitle}}</div>
</div>
<div slot="thumb">
<img :src="item.imgUrl" width="60" height="60">
</div>
<div slot="desc" class="text-muted">
{{item.desc}}
<img :src="item.imgUrl" width="60" height="60" />
</div>
<div slot="desc" class="text-muted">{{item.desc}}</div>
<!--<div slot="footer" style="position: relative;top: -35px;">
<van-icon name="arrow"></van-icon>
</div>-->
Expand All @@ -24,44 +23,43 @@
</pl-content-block>
</template>
<script>
import customerBrowser from 'core/utils/customerBrowser';
export default {
props: {
datas: Array
},
data () {
return {};
},
methods: {
to (item) {
customerBrowser.open(item.title, item.link);
}
import customerBrowser from "core/utils/customerBrowser";
export default {
props: {
datas: Array
},
data() {
return {};
},
methods: {
to(item) {
customerBrowser.open(item.title, item.link);
}
};
}
};
</script>
<style lang="scss" scoped>
@import '~assets/scss/_variables.scss';
.application {
margin-top: 15px;
background: $main-background-color;
}
@import "~assets/scss/_variables.scss";
.application {
margin-top: 15px;
background: $main-background-color;
}
</style>
<style lang="scss">
@import '~assets/scss/_variables.scss';
.application {
.van-card {
background: #fff;
padding: 5px 15px 5px 100px;
border-radius: $border-radius;
.van-card__thumb {
display:flex;
display: -webkit-flex;
align-items:center;
}
}
.card-title {
margin-top: 10px;
@import "~assets/scss/_variables.scss";
.application {
.van-card {
background: #fff;
padding: 5px 15px;
border-radius: $border-radius;
.van-card__thumb {
display: flex;
display: -webkit-flex;
align-items: center;
}
}
.card-title {
margin-top: 10px;
}
}
</style>
2 changes: 1 addition & 1 deletion src/pages/setting/popup/base-setting-pop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<div style="position: fixed;bottom: 0;width: 100%;">
<div class="single-btn margin-top margin-bottom">
<van-button size="large" round type="primary" @click="toLogout()" v-text="$t('setting.logout')"></van-button>
<van-button size="large" round type="primary" @click="toLogout()" :text="$t('setting.logout')"></van-button>
</div>
</div>
</van-popup>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/trade/popup/tradepair-add-pop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
round
type="primary"
@click="sure()"
v-text="$t('common.sure')"></van-button>
:text="$t('common.sure')"></van-button>
</div>
</div>
</van-popup>
Expand Down
10 changes: 5 additions & 5 deletions src/pages/transaction/send-bitcoin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</div>
</pl-content-block>
<pl-stick :offset-bottom="0">
<van-button size="large" :loading="loading" :disabled="firstBthDisabled" class="plat-btn" @click="firstStep" type="primary" v-text="$t('common.next')"></van-button>
<van-button size="large" :loading="loading" :disabled="firstBthDisabled" class="plat-btn" @click="firstStep" type="primary" :text="$t('common.next')"></van-button>
</pl-stick>
</div>
<van-actionsheet v-model="showFirstStep" :close-on-click-overlay="false">
Expand Down Expand Up @@ -93,16 +93,16 @@
</van-cell-group>
</div>
<pl-stick :offset-bottom="0">
<van-button size="large" :loading="loading" class="plat-btn" @click="secondStep()" type="primary" v-text="$t('common.next')"></van-button>
<van-button size="large" :loading="loading" class="plat-btn" @click="secondStep()" type="primary" :text="$t('common.next')"></van-button>
</pl-stick>
</div>
<div v-show="showSecondStep">
<van-nav-bar :title="$t('common.inputPwd')" left-arrow @click-left="showSecondStep = false" />
<van-cell-group>
<van-field v-model="form.password" ref="password" type="password" @click-icon="displayPassword = true" :placeholder="$t('transaction.walletPwdPlaceholder')" icon="password-not-view" v-show="!displayPassword"/>
<van-field v-model="form.password" ref="visualPassword" type="text" @click-icon="displayPassword = false" :placeholder="$t('transaction.walletPwdPlaceholder')" icon="password-view" v-show="displayPassword"/> </van-cell-group>
<van-field v-model="form.password" ref="password" type="password" @click-icon="displayPassword = true" :placeholder="$t('transaction.walletPwdPlaceholder')" icon="closed-eye" v-show="!displayPassword"/>
<van-field v-model="form.password" ref="visualPassword" type="text" @click-icon="displayPassword = false" :placeholder="$t('transaction.walletPwdPlaceholder')" icon="eye-o" v-show="displayPassword"/> </van-cell-group>
<pl-stick :offset-bottom="0">
<van-button size="large" :loading="loading" :disabled="!form.password" class="plat-btn" @click="submit" type="primary" v-text="$t('transaction.submit')"></van-button>
<van-button size="large" :loading="loading" :disabled="!form.password" class="plat-btn" @click="submit" type="primary" :text="$t('transaction.submit')"></van-button>
</pl-stick>
</div>
</div>
Expand Down
Loading

0 comments on commit c066004

Please sign in to comment.