ssbc / ssb-peer-invites

A new ssb invite system to create invites without having a pub
MIT License
26 stars 2 forks source link

TypeError: sbot.deviceAddress.getState is not a function #16

Open cryptix opened 5 years ago

cryptix commented 5 years ago

It seems like device addr v1.1.5 breaks this module ( https://github.com/ssbc/ssb-device-address/commit/48fb5cbc833f533d9f893e616eea321e225d62bf ).

Pinning to 1.1.4 works around this.

> ssb-peer-invites@1.1.5 test /home/cryptix/ssb-peer-invites
> set -e; for t in test/*.js; do node $t; done

(node:32599) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
TAP version 13
# create an invite
/home/cryptix/ssb-peer-invites/index.js:280
    sbot.deviceAddress.getState(function (err, state) {
                       ^

TypeError: sbot.deviceAddress.getState is not a function
    at Object.invites.getNearbyPubs (/home/cryptix/ssb-peer-invites/index.js:280:24)
    at Object.invites.create (/home/cryptix/ssb-peer-invites/index.js:360:13)
    at Object.hooked [as create] (/home/cryptix/ssb-peer-invites/node_modules/ssb-server/node_modules/hoox/index.js:10:15)
    at Test.<anonymous> (/home/cryptix/ssb-peer-invites/test/accept2.js:48:21)
    at Test.bound [as _cb] (/home/cryptix/ssb-peer-invites/node_modules/tape/lib/test.js:77:32)
    at Test.run (/home/cryptix/ssb-peer-invites/node_modules/tape/lib/test.js:96:10)
    at Test.bound [as run] (/home/cryptix/ssb-peer-invites/node_modules/tape/lib/test.js:77:32)
    at Immediate.next (/home/cryptix/ssb-peer-invites/node_modules/tape/lib/results.js:75:19)
    at processImmediate (internal/timers.js:443:21)