check auth
This commit is contained in:
parent
4e24f81f8a
commit
a72f6dd091
1 changed files with 4 additions and 0 deletions
|
|
@ -849,6 +849,10 @@ const sendHRWithInitialMsg = async (
|
||||||
* @returns {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
const sendPayment = async (to, amount, memo, gun, user, SEA) => {
|
const sendPayment = async (to, amount, memo, gun, user, SEA) => {
|
||||||
|
if (!user.is) {
|
||||||
|
throw new Error(ErrorCode.NOT_AUTH)
|
||||||
|
}
|
||||||
|
|
||||||
const recipientEpub = await Utils.pubToEpub(to)
|
const recipientEpub = await Utils.pubToEpub(to)
|
||||||
const ourSecret = await SEA.secret(recipientEpub, user._.sea)
|
const ourSecret = await SEA.secret(recipientEpub, user._.sea)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue