Skip to content

Commit

Permalink
i suck
Browse files Browse the repository at this point in the history
  • Loading branch information
Lemmmy committed Sep 30, 2016
1 parent 05e21f8 commit 6eaec5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/controllers/names.js
Expand Up @@ -186,7 +186,7 @@ NamesController.transferName = function(name, privatekey, address) {
updated: new Date()
}));

promises.push(tx.pushTransaction(address, results.address.address.toLowerCase(), 0, null, name.name));
promises.push(tx.pushTransaction(results.address.address.toLowerCase(), address, 0, null, name.name));

Promise.all(promises).then(function () {
name.reload().then(function() {
Expand Down
4 changes: 2 additions & 2 deletions src/transactions.js
Expand Up @@ -97,15 +97,15 @@ Transactions.createTransaction = function (to, from, value, name, op) {
});
};

Transactions.pushTransaction = function(sender, recipientAddress, amount, metadata) {
Transactions.pushTransaction = function(sender, recipientAddress, amount, metadata, name) {
return new Promise(function(resolve, reject) {
addresses.getAddress(recipientAddress).then(function(recipient) {
var promises = [];

promises.push(sender.decrement({ balance: amount }));
promises.push(sender.increment({ totalout: amount }));

promises.push(Transactions.createTransaction(recipientAddress, sender.address, amount, null, metadata));
promises.push(Transactions.createTransaction(recipientAddress, sender.address, amount, name, metadata));

if (!recipient) {
promises.push(schemas.address.create({
Expand Down

0 comments on commit 6eaec5f

Please sign in to comment.