anchor-link
Advanced tools
Comparing version 2.1.1 to 2.1.2
@@ -784,8 +784,13 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.AnchorLink = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ | ||
sign: async (args) => { | ||
const request = esr.SigningRequest.fromTransaction(args.chainId, args.serializedTransaction, this.requestOptions); | ||
const t = transport || this.transport; | ||
let request = esr.SigningRequest.fromTransaction(args.chainId, args.serializedTransaction, this.requestOptions); | ||
request.setCallback(this.createCallbackUrl(), true); | ||
request.setBroadcast(false); | ||
const { signatures } = await this.sendRequest(request, transport); | ||
if (t.prepare) { | ||
request = await t.prepare(request); | ||
} | ||
const { serializedTransaction, signatures, } = await this.sendRequest(request, t); | ||
return { | ||
...args, | ||
serializedTransaction, | ||
signatures, | ||
@@ -792,0 +797,0 @@ }; |
@@ -426,8 +426,13 @@ import * as esr from 'eosio-signing-request'; | ||
sign: async (args) => { | ||
const request = esr.SigningRequest.fromTransaction(args.chainId, args.serializedTransaction, this.requestOptions); | ||
const t = transport || this.transport; | ||
let request = esr.SigningRequest.fromTransaction(args.chainId, args.serializedTransaction, this.requestOptions); | ||
request.setCallback(this.createCallbackUrl(), true); | ||
request.setBroadcast(false); | ||
const { signatures } = await this.sendRequest(request, transport); | ||
if (t.prepare) { | ||
request = await t.prepare(request); | ||
} | ||
const { serializedTransaction, signatures, } = await this.sendRequest(request, t); | ||
return { | ||
...args, | ||
serializedTransaction, | ||
signatures, | ||
@@ -434,0 +439,0 @@ }; |
{ | ||
"name": "anchor-link", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "Library for authenticating and signing transactions using the Anchor Link protocol", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -559,3 +559,4 @@ import * as esr from 'eosio-signing-request' | ||
sign: async (args) => { | ||
const request = esr.SigningRequest.fromTransaction( | ||
const t = transport || this.transport | ||
let request = esr.SigningRequest.fromTransaction( | ||
args.chainId, | ||
@@ -567,5 +568,12 @@ args.serializedTransaction, | ||
request.setBroadcast(false) | ||
const {signatures} = await this.sendRequest(request, transport) | ||
if (t.prepare) { | ||
request = await t.prepare(request) | ||
} | ||
const { | ||
serializedTransaction, | ||
signatures, | ||
} = await this.sendRequest(request, t) | ||
return { | ||
...args, | ||
serializedTransaction, | ||
signatures, | ||
@@ -572,0 +580,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2785095
34749