Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master' into nfswSe…
Browse files Browse the repository at this point in the history
…arch
  • Loading branch information
jjeffryes committed Sep 22, 2017
2 parents ea8f485 + 88d8d43 commit a05d2d3
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 6 deletions.
3 changes: 2 additions & 1 deletion js/languages/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,8 @@
"receiveMoney": {
"title": "Receive Money",
"needBitcoin": "Need Bitcoin?",
"btnCancel": "Cancel"
"btnCancel": "Cancel",
"btnFundViaShapeshift": "Fund via ShapeShift"
},
"sendMoney": {
"toLabel": "To",
Expand Down
16 changes: 13 additions & 3 deletions js/templates/modals/wallet/receiveMoney.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,17 @@ <h2 class="h3 txCtr txUnl row"><%= ob.polyT('wallet.receiveMoney.title') %></h2>
<%= ob.spinner() %>
</div>
</div>
<div class="flexCent">
<i class="btcIcon margRSm"></i>
<a href="https://openbazaar.org/bitcoin" class="clrT txB txU"><%= ob.polyT('wallet.receiveMoney.needBitcoin') %></a>
<div class="flexCent buttonsWrap">
<div>
<div class="flexVCent gutterH">
<button class="btn btnThin clrP clrBr clrSh2 flexNoShrink js-fundViaShapeshift">
<i class="shapeShiftIcon icon" style="background-image: url('../imgs/shapeShiftIcon.png');"></i>
<%= ob.polyT('wallet.receiveMoney.btnFundViaShapeshift') %>
</button>
<div class="flexVCent">
<i class="btcIcon margRSm"></i>
<a href="https://openbazaar.org/bitcoin" class="clrT txB txU"><%= ob.polyT('wallet.receiveMoney.needBitcoin') %></a>
</div>
</div>
</div>
</div>
9 changes: 8 additions & 1 deletion js/views/modals/wallet/ReceiveMoney.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { clipboard } from 'electron';
import { clipboard, remote } from 'electron';
import _ from 'underscore';
import loadTemplate from '../../../utils/loadTemplate';
import baseVw from '../../baseVw';
Expand All @@ -22,6 +22,7 @@ export default class extends baseVw {
'click .js-receiveAddress': 'onClickReceiveAddress',
'click .js-receiveQrCode': 'onClickReceiveQrCode',
'click .js-cancelReceiveBtn': 'onClickCancelReceive',
'click .js-fundViaShapeshift': 'onClickFundViaShapshift',
};
}

Expand Down Expand Up @@ -58,6 +59,12 @@ export default class extends baseVw {
this.trigger('click-cancel');
}

onClickFundViaShapshift() {
const shapeshiftURL = `https://shapeshift.io/shifty.html?destination=${this.getState().address}&amp;output=BTC&apiKey=6e9fbc30b836f85d339b84f3b60cade3f946d2d49a14207d5546895ecca60233b47ec67304cdcfa06e019231a9d135a7965ae50de0a1e68d6ec01b8e57f2b812`;
const shapeshiftWin = new remote.BrowserWindow({ width: 700, height: 500, frame: true });
shapeshiftWin.loadURL(shapeshiftURL);
}

copyAddressToClipboard() {
clipboard.writeText(this.getState().address);
clearTimeout(this.copyTextFadeoutTimeout);
Expand Down
7 changes: 6 additions & 1 deletion styles/modules/modals/_wallet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
.sendReceiveContainer {
// So there's no jump when toggling between send / receive mode. If the larger
// size changes, this may need to be updated.
height: 346px;
height: 363px;
padding-top: 25px;

.receiveMoney {
Expand Down Expand Up @@ -106,6 +106,11 @@
right: 0;
top: -25px;
}

.buttonsWrap {
position: relative;
left: calc($padMd / 2);
}
}

.sendMoney {
Expand Down

0 comments on commit a05d2d3

Please sign in to comment.