@@ -38,18 +38,19 @@ const makePegasus = (zcf, board, namesByAddress) => {
38
38
* @property {LegacyMap<Denom, PromiseRecord<Courier>> } remoteDenomToCourierPK
39
39
* @property {IterationObserver<Denom> } remoteDenomPublication
40
40
* @property {Subscription<Denom> } remoteDenomSubscription
41
- * @property {number } lastDenomNonce
41
+ * @property {bigint } lastDenomNonce Distinguish Pegasus-created denom names
42
+ * that are sent and received from a remote connection
42
43
* @property {(reason: CloseReason) => void } abort
43
44
*/
44
45
45
- let lastLocalIssuerNonce = 0 ;
46
+ let lastLocalIssuerNonce = 0n ;
46
47
/**
47
48
* Create a new issuer keyword (based on Local + nonce)
48
49
*
49
50
* @returns {string }
50
51
*/
51
52
const createLocalIssuerKeyword = ( ) => {
52
- lastLocalIssuerNonce += 1 ;
53
+ lastLocalIssuerNonce += 1n ;
53
54
return `Local${ lastLocalIssuerNonce } ` ;
54
55
} ;
55
56
@@ -172,11 +173,10 @@ const makePegasus = (zcf, board, namesByAddress) => {
172
173
async pegLocal ( allegedName , localIssuer ) {
173
174
checkAbort ( ) ;
174
175
175
- // We need the last nonce for our denom name.
176
- localDenomState . lastDenomNonce += 1 ;
176
+ localDenomState . lastDenomNonce += 1n ;
177
177
const remoteDenom = `pegasus${ localDenomState . lastDenomNonce } ` ;
178
178
179
- // Create a seat in which to keep our denomination.
179
+ // Create a seat in which to keep our escrowed ERTP assets of this denomination.
180
180
const { zcfSeat : poolSeat } = zcf . makeEmptySeatKit ( ) ;
181
181
182
182
// Ensure the issuer can be used in Zoe offers.
@@ -298,7 +298,7 @@ const makePegasus = (zcf, board, namesByAddress) => {
298
298
localAddr,
299
299
remoteAddr,
300
300
remoteDenomToCourierPK,
301
- lastDenomNonce : 0 ,
301
+ lastDenomNonce : 0n ,
302
302
remoteDenomPublication,
303
303
remoteDenomSubscription,
304
304
abort : reason => {
@@ -336,10 +336,8 @@ const makePegasus = (zcf, board, namesByAddress) => {
336
336
const { remoteDenom } = parts ;
337
337
assert . typeof ( remoteDenom , 'string' ) ;
338
338
339
- const {
340
- remoteDenomToCourierPK,
341
- remoteDenomPublication,
342
- } = connectionToLocalDenomState . get ( c ) ;
339
+ const { remoteDenomToCourierPK, remoteDenomPublication } =
340
+ connectionToLocalDenomState . get ( c ) ;
343
341
344
342
if ( ! remoteDenomToCourierPK . has ( remoteDenom ) ) {
345
343
// This is the first time we've heard of this denomination.
0 commit comments