Skip to content

Commit d1ca1eb

Browse files
committed
fixes
1 parent 7eeca41 commit d1ca1eb

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

public/views/walletHome.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ <h4 class="title m0">
378378
<label for="address" class="left" ng-if="index.arrBalances.length > 0 && index.arrBalances[index.assetIndex].asset !== 'base'">
379379
<span translate>To byteball address</span>
380380
</label>
381-
<span ng-hide="sendPaymentForm.address.$pristine">
381+
<span>
382382
<span class="has-error right size-12" ng-show="sendPaymentForm.address.$invalid && _address">
383383
<i class="icon-close-circle size-14"></i>
384384
<span class="vm" translate>Not valid</span>

src/js/controllers/walletHome.js

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -695,9 +695,17 @@ angular.module('copayApp.controllers')
695695
};
696696
};
697697

698+
function getShareMessage(amount, mnemonic) {
699+
return {
700+
message: "Here is your link to receive "+amount+" bytes https://byteball.org/openapp.html#textcoin?" + mnemonic,
701+
subject: "Byteball user beamed you money"
702+
}
703+
}
704+
698705
this.openShareTextcoinModal = function(addr, mnemonic, amount, isResend) {
699-
var text = "Your link to claim " + amount + " bytes : https://byteball.org/openapp.html#textcoin?" + mnemonic;
700-
var subject = "Byteball user beamed you money";
706+
var msg = getShareMessage(amount, mnemonic);
707+
var text = msg.message;
708+
var subject = msg.subject;
701709
$rootScope.modalOpened = true;
702710
var fc = profileService.focusedClient;
703711
var ModalInstanceCtrl = function($scope, $modalInstance) {
@@ -1015,10 +1023,7 @@ angular.module('copayApp.controllers')
10151023
if (isMobile.Android() || isMobile.Windows()) {
10161024
window.ignoreMobilePause = true;
10171025
}
1018-
window.plugins.socialsharing.shareWithOptions({
1019-
1020-
message: "Here is your link to receive "+(amount-constants.TEXTCOIN_CLAIM_FEE)+" bytes https://byteball.org/openapp.html#textcoin?" + mnemonic, subject: "Byteball user beamed you money"
1021-
});
1026+
window.plugins.socialsharing.shareWithOptions(getShareMessage(amount-constants.TEXTCOIN_CLAIM_FEE, mnemonic));
10221027
} else {
10231028
self.openShareTextcoinModal(null, mnemonic, amount-constants.TEXTCOIN_CLAIM_FEE);
10241029
}
@@ -1060,7 +1065,6 @@ angular.module('copayApp.controllers')
10601065
$scope.index.assetIndex = $scope.assetIndexSelectorValue;
10611066
this.shownForm = 'payment';
10621067
}
1063-
this.resetForm();
10641068
}
10651069

10661070
this.submitData = function() {
@@ -1495,9 +1499,7 @@ angular.module('copayApp.controllers')
14951499
if (isMobile.Android() || isMobile.Windows()) {
14961500
window.ignoreMobilePause = true;
14971501
}
1498-
window.plugins.socialsharing.shareWithOptions({
1499-
message: "Here is your link to receive "+(btx.amount-constants.TEXTCOIN_CLAIM_FEE)+" bytes: https://byteball.org/openapp.html#textcoin?" + btx.mnemonic, subject: "Byteball user beamed you money"
1500-
});
1502+
window.plugins.socialsharing.shareWithOptions(getShareMessage(btx.amount-constants.TEXTCOIN_CLAIM_FEE, btx.mnemonic));
15011503
} else {
15021504
self.openShareTextcoinModal(btx.textAddress, btx.mnemonic, btx.amount-constants.TEXTCOIN_CLAIM_FEE, true);
15031505
}

src/js/directives/directives.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ angular.module('copayApp.directives')
6161
return {
6262
require: 'ngModel',
6363
link: function(scope, elem, attrs, ctrl) {
64-
attrs.selectable
6564
var validator = function(value) {
6665
if (!profileService.focusedClient)
6766
return;

0 commit comments

Comments
 (0)